MediaWiki:Common.js: Difference between revisions
MediaWiki interface page
More actions
No edit summary |
No edit summary |
||
| Line 206: | Line 206: | ||
function getSpellIcon(iconType) { | function getSpellIcon(iconType) { | ||
var | var fileName = iconType === 'divine' ? 'DivineIcon.png' : 'ArcaneIcon.png'; | ||
var | var scriptPath = mw.config.get('wgScriptPath') || ''; | ||
return $('<img>') | |||
.attr('src', scriptPath + '/index.php/Special:FilePath/' + encodeURIComponent(fileName)) | |||
.attr('alt', '') | |||
.attr('loading', 'lazy') | |||
.attr('decoding', 'async'); | |||
. | |||
. | |||
.attr(' | |||
} | } | ||