MediaWiki:Mobile.js: Difference between revisions

From bg3.wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(37 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 */


// Update this to `SELECT MAX(page_id) FROM page` on August 3rd
/*
var launchDayMaxPageId = 5000;
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();
}
}


if (false && !mw.config.get("wgIsMainPage") &&
function bg3wikiHideAdSlots() {
      mw.config.get("wgNamespaceNumber") == 0 &&
document.body.classList.replace("mw-ads-enabled", "mw-ads-disabled");
      mw.config.get("wgArticleId") <= launchDayMaxPageId
      ) {
var notice = document.getElementById("siteNotice");
notice.style.border = "2px solid var(--bdr-hl)";
notice.style.padding = "5px";
notice.style.fontSize = "1.2em";
notice.innerHTML =
"<b>[Test] Warning: This page was created during Early Access. " +
"It may not be up to date with the release version.</b>";
}
}
*/

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");
}
*/