Changes

MediaWiki:Common.js

701 bytes added, 00:22, 8 November 2023
no edit summary
})
/* Replaces the rarity keywords like "worn, "sturdy", "powerful", "epic", "mythical" or , "legendary", and "godly" to have their icon with on the left of the rarity name */
Array.from(document.getElementsByClassName('rarity')).forEach(function (element) {
element.innerHTML = element.innerHTML.replace(/worn/gi, '<a class="image"><span style="color: #808080;">Worn</span> <img alt="Worn Icon.png" src="/images/3/34/Worn_Icon.png" width="18"> <span style="color: #808080;">Worn</span></a>'); element.innerHTML = element.innerHTML.replace(/sturdy/gi, '<a class="image"> <img alt="Sturdy Icon.png" src="/images/c/cf/Sturdy_Icon.png" width="18"><span style="color: #808000;">Sturdy</span> </a>'); element.innerHTML = element.innerHTML.replace(/powerful/gi, '<a class="image"> <img alt="Sturdy Powerful Icon.png" src="/images/c2/cf29/Sturdy_IconPowerful_Icon.png" width="18"> <span style="color: #008000;">Powerful</span></a>'); element.innerHTML = element.innerHTML.replace(/powerfulepic/gi, '<a class="image"> <img alt="Epic Icon.png" src="/images/f/fc/Epic_Icon.png" width="18"><span style="color: #0080003366FF;">PowerfulEpic</span> </a>'); element.innerHTML = element.innerHTML.replace(/mythical/gi, '<a class="image"> <img alt="Powerful Mythical Icon.png" src="/images/21/2918/Powerful_IconMythical_Icon.png" width="18"> <span style="color: #FF00FF;">Mythical</span></a>'); element.innerHTML = element.innerHTML.replace(/epiclegendary/gi, '<a class="image"> <img alt="Legendary Icon.png" src="/images/1/11/Legendary_Icon.png" width="18"><span style="color: #3366FFFF9900;">EpicLegendary</span> </a>'); element.innerHTML = element.innerHTML.replace(/godly/gi, '<a class="image"> <img alt="Epic Godly Icon.png" src="/images/fd/fcd0/Epic_IconGodly_Icon.png" width="18"> <span style="color: #00FFFF;">Godly</span></a>');
})
WikiDefender
1,807
edits