MediaWiki:Mobile.js: Difference between revisions

From bg3.wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(25 intermediate revisions by the same user not shown)
Line 1: Line 1:
/* All JavaScript here will be loaded for users of the mobile site */
/* All JavaScript here will be loaded for users of the mobile site */


(function () {
/*
var launchDayMaxPageId = 6545;
if (document.readyState === 'complete') {
if (
bg3wikiCheckAdBlock();
mw.config.get("wgIsMainPage") ||
} else {
mw.config.get("wgNamespaceNumber") !== 0 ||
window.addEventListener('load', bg3wikiCheckAdBlock);
mw.config.get("wgArticleId") > launchDayMaxPageId ||
}
mw.config.get("wgAction") !== "view"
) {
return;
}
    if (
    document.getElementById("bg3wiki-uptodate-notice") ||
    document.getElementById("bg3wiki-legacy-content-notice")
    ) {
    return;
    }
var notice = document.getElementById("siteNotice");
notice.style.margin = "10px 10px 0";
notice.style.fontWeight = "bold";
notice.style.color = "yellow"
notice.innerHTML =
"This page was created during Early Access. " +
"It may not be up to date with the release version.";
})();


(function () {
function bg3wikiCheckAdBlock() {
var notice = document.getElementById("bg3wiki-downtime-notice");
var adsEnabled = document.body.classList.contains("mw-ads-enabled");
if (notice && new Date().getMonth() + 1 == 9) {
if (adsEnabled && window.fusetag === undefined) {
notice.style.display = 'block';
bg3wikiHideAdSlots();
}
}
})();
}
 
function bg3wikiHideAdSlots() {
document.body.classList.replace("mw-ads-enabled", "mw-ads-disabled");
}
*/

Latest revision as of 20:13, 14 August 2024

/* All JavaScript here will be loaded for users of the mobile site */

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

function bg3wikiCheckAdBlock() {
	var adsEnabled = document.body.classList.contains("mw-ads-enabled");
	if (adsEnabled && window.fusetag === undefined) {
		bg3wikiHideAdSlots();
	}
}

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