Changes

MediaWiki:Common.js

365 bytes added, 02:32, 15 February 2023
Created page with "Any JavaScript here will be loaded for all users on every page load.: Replaces the word "gems" with the gem icon in texts where gem costs are mentioned: [...documen..."
/* Any JavaScript here will be loaded for all users on every page load. */

/* Replaces the word "gems" with the gem icon in texts where gem costs are mentioned */
[...document.getElementsByClassName('gem-cost-included')].forEach(element => {
element.textContent = element.textContent.replace(/gems\s*?(\d+)|(\d+)\s*?gems/, '[[File:Gem Icon.png|18px]] $1$2')
})
WikiDefender, bureaucrat, administrator
618
edits