Changes

MediaWiki:Common.js

732 bytes added, 23:41, 7 November 2023
Testing
Array.from(document.getElementsByClassName('pass-xp')).forEach(function (element) {
element.innerHTML = element.innerHTML.replace(/xp?(\d.+)|(\d.+)xp?/gi, '<a class="image"><img alt="Defender Pass XP Icon.png" src="/images/2/23/Defender_Pass_XP_Icon.png" width="18"></a> $1$2')
})
 
/* Replaces the rarity keywords like "mythical" or "legendary" to have their icon with the rarity */
Array.from(document.getElementsByClassName('rarity')).forEach(function (element) {
element.innerHTML = element.innerHTML.replace(/worn/gi, '<a class="image" style="color: #808080;><img alt="Worn Icon.png" src="/images/3/34/Worn_Icon.png" width="18"></a>')
element.innerHTML = element.innerHTML.replace(/worn/gi, '<a class="image" style="color: #808080;><img alt="Sturdy Icon.png" src="/images/c/cf/Sturdy_Icon.png" width="18"></a>')
element.innerHTML = element.innerHTML.replace(/worn/gi, '<a class="image" style="color: #808080;><img alt="Powerful Icon.png" src="/images/2/29/Powerful_Icon.png" width="18"></a>')
})
WikiDefender
1,807
edits