Changes

MediaWiki:Common.js

1 byte added, 00:23, 16 November 2023
Adding the missing space between currency icon and number
if (!element.innerHTML.match(/Gem|Gold|Defender Medal/i)) return
const currency = element.innerHTML.match(/Gem|Gold|Defender Medal/i).toString()
element.innerHTML = element.innerHTML.replace(/(Gem|Gold|Defender Medal)s? (\d.*?)\b|(\d.*?) (Gem|Gold|Defender Medal)s?/gi, currencyIcons[currency] + "$2$3")
})
})
/* Replaces the rarity keywords like "wornWorn, "sturdySturdy", "powerfulPowerful", "epicEpic", "mythicalMythical", "legendaryLegendary", and "godlyGodly" to have their icon on the left of the name */
Array.from(document.getElementsByClassName('rarity')).forEach(function (element) {
element.innerHTML = element.innerHTML.replace(/Worn/gi, '<a class="image"> <img alt="Worn Icon.png" src="/images/3/34/Worn_Icon.png" width="18"> <span style="color: #808080;">Worn</span> </a>');
WikiDefender, bureaucrat, administrator
618
edits