MediaWiki:Common.js: Difference between revisions

From PHIGHTING! Wiki
m
Fixing JS relying on URLs
mNo edit summary
m (Fixing JS relying on URLs)
Line 53:
if ($("h3:contains(Pronoun(s))").length > 0) {
pronouns = $("h3:contains(Pronoun(s))").next()[0].innerHTML.toLowerCase();
if (location.pathname.split('/')[21] in pronounExclusions) {
phighterName = pronounExclusions[location.pathname.split('/')[21]];
$("h3:contains(Pronoun(s))").next()[0].title = 'While most demons are agender and use any pronouns, ' + phighterName + ' prefers ' + pronouns + ' pronouns!';
}
Line 69:
if (document.querySelectorAll("#ph-nav-dynamic-color").length > 0) {
const nodeList = document.querySelectorAll("#ph-nav-dynamic-color");
const dynamicColor = dynamicColorLibrary[location.pathname.split('/')[21]];
nodeList.forEach(function (currentValue, currentIndex) {
Cookies help us deliver our services. By using our services, you agree to our use of cookies.