Module:AbilityHints: Difference between revisionsGive feedback
Render hint icons without the item link so the icon no longer triggers the native title and infobox-tooltip gadget; only the custom hint tooltip remains (with help from vergir-bot LLM) |
Wrap hint icons in our own link to the item page (keeps click-through while icon still renders link-free) for tooltip testing (with help from vergir-bot LLM) |
||
| Line 47: | Line 47: | ||
for _, def in ipairs(CONFIG) do | for _, def in ipairs(CONFIG) do | ||
if member[def.list] and not (def.suppressed_by and member[def.suppressed_by]) then | if member[def.list] and not (def.suppressed_by and member[def.suppressed_by]) then | ||
local url = tostring(mw.uri.localUrl(def.item)) | |||
local img = icon_module._render(def.item, { size = '24px', ['icon-only'] = 'true', ['no-link'] = 'true' }) | local img = icon_module._render(def.item, { size = '24px', ['icon-only'] = 'true', ['no-link'] = 'true' }) | ||
table.insert(icons, | table.insert(icons, | ||
'< | '<a class="ability-hint" href="' .. url .. '">' .. img | ||
.. '<span class="ability-hint-tip">' .. def.tip .. '</span></ | .. '<span class="ability-hint-tip">' .. def.tip .. '</span></a>' | ||
) | ) | ||
end | end | ||