MediaWiki:Vector.js: Difference between revisions

From bg3.wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
/* All JavaScript here will be loaded for users of the Vector skin */
/* All JavaScript here will be loaded for users of the Vector skin */


console.log(document.readyState)
if (document.readyState === 'complete') {
console.log("vector.js executing");
bg3wikiCheckAdBlock();
console.log(document.readyState)
} else {
 
window.addEventListener('load', bg3wikiCheckAdBlock);
addEventListener('load', bg3wikiCheckAdBlock);
}


function bg3wikiCheckAdBlock() {
function bg3wikiCheckAdBlock() {
console.log("check ad block executing");
if (window.fusetag === undefined) {
if (window.fusetag === undefined) {
bg3wikiHideAdSlots();
bg3wikiHideAdSlots();

Revision as of 18:19, 9 August 2024

/* All JavaScript here will be loaded for users of the Vector skin */

if (document.readyState === 'complete') {
	bg3wikiCheckAdBlock();
} else {
	window.addEventListener('load', bg3wikiCheckAdBlock);
}

function bg3wikiCheckAdBlock() {
	if (window.fusetag === undefined) {
		bg3wikiHideAdSlots();
	}
}

function bg3wikiHideAdSlots() {
	document.body.classList.replace("mw-ads-enabled", "mw-ads-disabled");
}