Changes

Jump to: navigation, search

MediaWiki:Common.js

519 bytes added, 18:17, 15 February 2023
no edit summary
/* Any JavaScript here will be loaded for all users on every page load. */
/* Replaces the word "currency keywords (gold, gems" , defender medals) with the gem their icon in texts where gem which include currency costs are mentioned */Array.from(document.getElementsByClassName('gem-costcurrency-included')).forEach(function (element) { element.innerHTML = element.innerHTML.replace(/gems?\s*?([\d,]+)|([\d,]+)\s*?gems?/gi, '<a href="/wiki/File:Gem_Icon.png" class="image"><img alt="Gem Icon.png" src="/images/8/8d/Gem_Icon.png" width="18" height></a> $1$2') element.innerHTML = element.innerHTML.replace(/gold\s*?([\d,]+)|([\d,]+)\s*?gold/gi, '<a href="/wiki/File:Gold_Icon.png" class="15image"><img alt="Gold Icon.png" src="/images/2/26/Gold_Icon.png" width="18"></a> $1$2') element.innerHTML = element.innerHTML.replace(/defender medals?\s*?([\d,]+)|([\d,]+)\s*?defender medals?/gi, '<a href="/wiki/File:Defender_Medal_Icon.png" class="image"><img alt="Defender Medal Icon.png" src="/images/a/a7/Defender_Medal_Icon.png" width="18"></a> $1$2')
})
WikiDefender, bureaucrat, administrator
618
edits

Navigation menu