MediaWiki:Common.js: Difference between revisions
Content deleted Content added
Sillyvizion (talk | contribs) mNo edit summary |
Sillyvizion (talk | contribs) m Fixing JS relying on URLs |
||
(4 intermediate revisions by the same user not shown) | |||
Line 17:
Vine_Staff:"#FF5877",
Flipside:"
Valk:"#FDEA8D",
Dom:"#C79EFF",
Line 53:
if ($("h3:contains(Pronoun(s))").length > 0) {
pronouns = $("h3:contains(Pronoun(s))").next()[0].innerHTML.toLowerCase();
if (location.pathname.split('/')[
phighterName = pronounExclusions[location.pathname.split('/')[
$("h3:contains(Pronoun(s))").next()[0].title = 'While most demons are agender and use any pronouns, ' + phighterName + ' prefers ' + pronouns + ' pronouns!';
}
Line 67:
/* It is kind of bad practice because MW is IE11 compatible. Grr */
if (document.querySelectorAll("#ph-nav-dynamic-color").length > 0) {
const nodeList = document.querySelectorAll("#ph-nav-dynamic-color");
const dynamicColor = dynamicColorLibrary[location.pathname.split('/')[
nodeList.forEach(function (currentValue, currentIndex) {
nodeList[currentIndex].addEventListener("mouseover", function (e) {
if (dynamicColor === "Flipside") {▼
flipsideColors = [dynamicColorLibrary["Valk"], dynamicColorLibrary["Dom"]];▼
▲ if (dynamicColor == Flipside) {
▲ flipsideColors = [dynamicColorLibrary[Valk], dynamicColorLibrary[Dom]];
boxShadowColor = Math.floor(Math.random()*flipsideColors.length);
|