Module:AbilityHints: Difference between revisionsGive feedback
Revert to span-wrapped icons: MediaWiki escapes raw anchor tags in module output, so the custom-link approach renders as broken text. Back to the working no-link version (with help from vergir-bot LLM) Tag: Manual revert |
Test: link hint icons via full URL so the anchor has no title attribute, which Page Previews (Popups) requires to fire — keeps click-through without the preview popup (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 img = icon_module._render(def.item, { size = '24px', ['icon-only'] = 'true', | -- Link via a full URL so the anchor has NO title attribute — that's | ||
-- what Page Previews (Popups) keys off of — while staying clickable. | |||
local url = tostring(mw.uri.canonicalUrl(def.item)) | |||
local img = icon_module._render(def.item, { size = '24px', ['icon-only'] = 'true', link = url }) | |||
table.insert(icons, | table.insert(icons, | ||
'<span class="ability-hint">' .. img | '<span class="ability-hint">' .. img | ||