Wiki Tooltips

One script tag gives your site's readers hover cards for Ethyrial items, quests, NPCs, spells, talents, statuses, zones, loot tables, resources and recipes — the same preview the wiki itself shows.

Add it to your page

Drop this anywhere on the page, once:

<script src="https://ethyrial-web.ryan-fec.workers.dev/tooltips.js" defer></script>

Every link to an Ethyrial wiki page — on ethyrial-web.ryan-fec.workers.dev or ethyrial.com — is picked up automatically. Nothing fetches until a reader actually hovers or focuses a link, and each data shard is fetched once and cached for the life of the page.

To mark up text that is not a link, add a data-ethyrial attribute naming the type and slug exactly as they appear in the wiki URL:

<span data-ethyrial="item/attuned-darkshroud-leather" tabindex="0">Darkshroud leather</span>

Configuration

Optional. Set window.ethyrialTooltips before the script tag:

window.ethyrialTooltips = {
  selector: 'main',   // only elements matching or inside this selector get tooltips
  domain: true,       // also match root-relative /wiki/... links on your own host
  icons: true         // set false to hide entity icons in the card
};
OptionEffect
selector A CSS selector scoping where tooltips activate — a trigger matches when it is the element or sits inside one. Omit it to cover the whole page.
domain true opts your own host in, so root-relative /wiki/<type>/<slug>/ links preview too. A hostname string or array of hostnames additionally matches absolute links to those hosts.
icons false suppresses the painted entity icon; the card renders name-first. Default true.

Live demo

Hover or tab to any of these. The card is keyboard-reachable, dismisses on Escape, and never intercepts a click — the link still navigates.

How it works