MediaWiki:Mobile.js: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 6: | Line 6: | ||
function bg3wikiEnableAds() { | function bg3wikiEnableAds() { | ||
if (window.fusetag === undefined) { | if (window.fusetag === undefined) { | ||
bg3wikiDisableAds(); | bg3wikiDisableAds(); | ||
return; | return; | ||
} | } | ||
if (window.innerHeight < 720) { | |||
bg3wikiDisableAds(); | |||
return; | |||
} | |||
} | } | ||
Revision as of 15:52, 9 August 2024
/* All JavaScript here will be loaded for users of the mobile site */
if (mw.config.get("wgUserId") == null) {
addEventListener('load', bg3wikiEnableAds);
}
function bg3wikiEnableAds() {
if (window.fusetag === undefined) {
bg3wikiDisableAds();
return;
}
if (window.innerHeight < 720) {
bg3wikiDisableAds();
return;
}
}
function bg3wikiDisableAds() {
document.body.classList.replace("mw-ads-enabled", "mw-ads-disabled");
}