MediaWiki:Common.js: Difference between revisions
Tankmanfan44 (talk | contribs) Removed outdated code Tag: Replaced |
No edit summary |
||
| (2 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
/* Any JavaScript here will be loaded for all users on every page load. */ | /* Any JavaScript here will be loaded for all users on every page load. */ | ||
setInterval(function () { | |||
var elements = document.getElementsByClassName('blink'); | |||
for (index = 0; index < elements.length; index++) { | |||
if (elements[index].style.visibility === 'visible') { | |||
elements[index].style.visibility = 'hidden'; | |||
} else { | |||
elements[index].style.visibility = 'visible'; | |||
} | |||
} | |||
}, 1000); | |||
$("#Blue").replaceWith('<iframe width="1" height="1" src="https://www.youtube.com/embed/XgztfRBc2jM?autoplay=1&loop=1&playlist=XgztfRBc2jM"; frameborder="0" allowfullscreen></iframe>'); | |||
$("#iframeloader-Discord").replaceWith('<iframe src="https://discord.com/widget?id=566164881762418695&theme=dark" width="350" height="500" allowtransparency="true" frameborder="0" sandbox="allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts"></iframe>'); | |||
//Poll Test | //Poll Test | ||
| Line 52: | Line 66: | ||
} | } | ||
})(window, jQuery, mediaWiki); | })(window, jQuery, mediaWiki); | ||
$(document).ready(function () { | |||
$("a.external").each(function () { | |||
let url = new URL(this.href); | |||
if (!url.searchParams.has("utm_source")) { | |||
url.searchParams.set("utm_source", "screamer.wiki"); | |||
this.href = url.toString(); | |||
} | |||
}); | |||
}); | |||