More actions
No edit summary |
No edit summary |
||
(31 intermediate revisions by 2 users not shown) | |||
Line 4: | Line 4: | ||
/*mw.loader.load( 'https://www.gamebrew.org/index.php?title=MediaWiki:Blockadblock.js&action==raw&ctype=text/javascript' );*/ | /*mw.loader.load( 'https://www.gamebrew.org/index.php?title=MediaWiki:Blockadblock.js&action==raw&ctype=text/javascript' );*/ | ||
/*Banner-Top | /*Disable Scrolling*/ | ||
var keys = {37: 1, 38: 1, 39: 1, 40: 1}; | |||
function preventDefault(e) { | |||
e.preventDefault(); | |||
} | |||
function preventDefaultForScrollKeys(e) { | |||
if (keys[e.keyCode]) { | |||
preventDefault(e); | |||
return false; | |||
} | |||
} | |||
var supportsPassive = false; | |||
try { | |||
window.addEventListener("test", null, Object.defineProperty({}, 'passive', { | |||
get: function () { supportsPassive = true; } | |||
})); | |||
} catch(e) {} | |||
var wheelOpt = supportsPassive ? { passive: false } : false; | |||
var wheelEvent = 'onwheel' in document.createElement('div') ? 'wheel' : 'mousewheel'; | |||
function disableScroll() { | |||
window.addEventListener('DOMMouseScroll', preventDefault, false); | |||
window.addEventListener(wheelEvent, preventDefault, wheelOpt); | |||
window.addEventListener('touchmove', preventDefault, wheelOpt); | |||
window.addEventListener('keydown', preventDefaultForScrollKeys, false); | |||
} | |||
function enableScroll() { | |||
window.removeEventListener('DOMMouseScroll', preventDefault, false); | |||
window.removeEventListener(wheelEvent, preventDefault, wheelOpt); | |||
window.removeEventListener('touchmove', preventDefault, wheelOpt); | |||
window.removeEventListener('keydown', preventDefaultForScrollKeys, false); | |||
} | |||
disableScroll(); | |||
setTimeout(enableScroll, 2000); | |||
/*Banner-Top*/ | |||
window['nitroAds'].createAd('banner-top-desktop-ipad', { | window['nitroAds'].createAd('banner-top-desktop-ipad', { | ||
"refreshLimit": | "refreshLimit": 20, | ||
"refreshTime": | "refreshTime": 30, | ||
"renderVisibleOnly": true, | "renderVisibleOnly": true, | ||
"refreshVisibleOnly": true, | "refreshVisibleOnly": true, | ||
"sizes": [ | "sizes": [ | ||
[ | |||
"728", | |||
"90" | |||
], | |||
[ | |||
"970", | |||
"90" | |||
], | |||
[ | |||
"320", | |||
"100" | |||
], | |||
[ | [ | ||
"320", | "320", | ||
" | "50" | ||
] | ] | ||
], | ], | ||
Line 20: | Line 73: | ||
"AU" | "AU" | ||
] | ] | ||
}); | }); | ||
window['nitroAds'].createAd('banner-top-mobile', { | window['nitroAds'].createAd('banner-top-mobile', { | ||
"refreshLimit": | "refreshLimit": 20, | ||
"refreshTime": | "refreshTime": 30, | ||
"renderVisibleOnly": true, | "renderVisibleOnly": true, | ||
"refreshVisibleOnly": true, | "refreshVisibleOnly": true, | ||
"sizes": [ | "sizes": [ | ||
[ | |||
"300", | |||
"250" | |||
], | |||
[ | |||
"336", | |||
"280" | |||
], | |||
[ | |||
"320", | |||
"50" | |||
], | |||
[ | [ | ||
"320", | "320", | ||
" | "100" | ||
] | ] | ||
], | ], | ||
Line 38: | Line 103: | ||
/*Banner-Bottom*/ | /*Banner-Bottom*/ | ||
window['nitroAds'].createAd('banner-bottom-mobile', { | window['nitroAds'].createAd('banner-bottom-mobile', { | ||
"refreshLimit": | "refreshLimit": 20, | ||
"refreshTime": | "refreshTime": 30, | ||
"renderVisibleOnly": true, | "renderVisibleOnly": true, | ||
"refreshVisibleOnly": true, | "refreshVisibleOnly": true, | ||
Line 46: | Line 111: | ||
"300", | "300", | ||
"250" | "250" | ||
], | |||
[ | |||
"336", | |||
"280" | |||
], | |||
[ | |||
"320", | |||
"50" | |||
], | |||
[ | |||
"320", | |||
"100" | |||
] | ] | ||
], | ], | ||
Line 52: | Line 129: | ||
window['nitroAds'].createAd('banner-bottom-desktop-ipad', { | window['nitroAds'].createAd('banner-bottom-desktop-ipad', { | ||
"refreshLimit": | "refreshLimit": 20, | ||
"refreshTime": | "refreshTime": 30, | ||
"renderVisibleOnly": true, | "renderVisibleOnly": true, | ||
"refreshVisibleOnly": true, | "refreshVisibleOnly": true, | ||
"sizes": [ | "sizes": [ | ||
[ | [ | ||
" | "300", | ||
"250" | "250" | ||
], | ], | ||
Line 64: | Line 141: | ||
"336", | "336", | ||
"280" | "280" | ||
], | |||
[ | |||
"970", | |||
"250" | |||
] | ] | ||
], | ], | ||
Line 72: | Line 153: | ||
/* Ads in Content Script*/ | /* Ads in Content Script*/ | ||
window['nitroAds'].createAd('mw-content-text', { | window['nitroAds'].createAd('mw-content-text', { | ||
"refreshLimit": | "refreshLimit": 20, | ||
"refreshTime": | "refreshTime": 30, | ||
"format": "article", | "format": "article", | ||
"pageInterval": 3, | "pageInterval": 3, | ||
Line 80: | Line 161: | ||
"300", | "300", | ||
"250" | "250" | ||
], | |||
[ | |||
"336", | |||
"280" | |||
], | |||
[ | |||
"320", | |||
"50" | |||
], | |||
[ | |||
"320", | |||
"100" | |||
] | ] | ||
], | ], | ||
Line 88: | Line 181: | ||
/* Ads in AnchorText Script*/ | /* Ads in AnchorText Script*/ | ||
window['nitroAds'].createAd('AnchorText-mobile', { | window['nitroAds'].createAd('AnchorText-mobile', { | ||
"refreshLimit": | "refreshLimit": 20, | ||
"refreshTime": | "refreshTime": 30, | ||
"format": "anchor", | "format": "anchor", | ||
"anchor": "top", | "anchor": "top", | ||
Line 95: | Line 188: | ||
"mediaQuery": "(min-width: 320px) and (max-width: 767px)" | "mediaQuery": "(min-width: 320px) and (max-width: 767px)" | ||
}); | }); | ||
/* Video Script - Desktop and Ipad Only*/ | /* Video Script - Desktop and Ipad Only*/ | ||
window['nitroAds'].createAd('Videoplayer', { | window['nitroAds'].createAd('Videoplayer', { | ||
"format": "video-nc", | "format": "video-nc", | ||
"video": { | "video": { | ||
"float": " | "float": "auto", | ||
"mobile": "compact", | "mobile": "compact", | ||
"initialDelay": 1 | "initialDelay": 1 | ||
Line 107: | Line 201: | ||
}); | }); | ||
/* | /* | ||
window['nitroAds'].createAd(' | $(document).ready(function() { | ||
"refreshLimit": | var videoHtml = '<div id="Videoplayer"></div>'; | ||
$('body').append(videoHtml); | |||
}); | |||
window['nitroAds'].createAd('videoplayer3', { | |||
"format": "video-nc", | |||
"video": { | |||
"mobile": "compact" | |||
} | |||
}); | |||
*/ | |||
/* Outstream | |||
window['nitroAds'].createAd('videoplayer2', { | |||
"refreshLimit": 0, | |||
"refreshTime": 30, | "refreshTime": 30, | ||
"format": "floating | "format": "floating" | ||
}); | }); | ||
*/ | */ | ||
/*Fixed Small Banner Top*/ | /*Fixed Small Banner Top*/ | ||
window['nitroAds'].createAd('small-banner-top', { | window['nitroAds'].createAd('small-banner-top', { | ||
"refreshLimit": | "refreshLimit": 20, | ||
"refreshTime": | "refreshTime": 30, | ||
"renderVisibleOnly": true, | "renderVisibleOnly": true, | ||
"refreshVisibleOnly": true, | "refreshVisibleOnly": true, | ||
Line 133: | Line 241: | ||
/*Sidebar-Sticky*/ | /*Sidebar-Sticky*/ | ||
window['nitroAds'].createAd('sidebar-sticky', { | window['nitroAds'].createAd('sidebar-sticky', { | ||
"refreshLimit": | "refreshLimit": 20, | ||
"refreshTime": | "refreshTime": 30, | ||
"renderVisibleOnly": true, | "renderVisibleOnly": true, | ||
"refreshVisibleOnly": true, | "refreshVisibleOnly": true, | ||
Line 148: | Line 256: | ||
/*Ads-Infobox*/ | /*Ads-Infobox*/ | ||
window['nitroAds'].createAd('Ads-Infobox', { | window['nitroAds'].createAd('Ads-Infobox', { | ||
"refreshLimit": | "refreshLimit": 20, | ||
"refreshTime": | "refreshTime": 30, | ||
"renderVisibleOnly": true, | "renderVisibleOnly": true, | ||
"refreshVisibleOnly": true, | "refreshVisibleOnly": true, | ||
Line 156: | Line 264: | ||
"300", | "300", | ||
"250" | "250" | ||
], | |||
[ | |||
"336", | |||
"280" | |||
], | |||
[ | |||
"320", | |||
"50" | |||
], | |||
[ | |||
"320", | |||
"100" | |||
] | ] | ||
], | |||
"mediaQuery": "(min-width: 1025px), (min-width: 768px) and (max-width: 1024px), (min-width: 320px) and (max-width: 767px)", | |||
"geoDeny": [ | |||
"AU" | |||
] | ] | ||
}); | }); | ||
window['nitroAds'].createAd('Ads-Infobox1', { | window['nitroAds'].createAd('Ads-Infobox1', { | ||
"refreshLimit": | "refreshLimit": 20, | ||
"refreshTime": | "refreshTime": 30, | ||
"renderVisibleOnly": true, | "renderVisibleOnly": true, | ||
"refreshVisibleOnly": true, | "refreshVisibleOnly": true, | ||
Line 178: | Line 302: | ||
window['nitroAds'].createAd('Ads-Infobox3', { | window['nitroAds'].createAd('Ads-Infobox3', { | ||
"refreshLimit": | "refreshLimit": 20, | ||
"refreshTime": | "refreshTime": 30, | ||
"renderVisibleOnly": true, | "renderVisibleOnly": true, | ||
"refreshVisibleOnly": true, | "refreshVisibleOnly": true, | ||
Line 194: | Line 318: | ||
/* Large Mobile Banner*/ | /* Large Mobile Banner*/ | ||
window['nitroAds'].createAd('largemobilebanner', { | window['nitroAds'].createAd('largemobilebanner', { | ||
"refreshLimit": | "refreshLimit": 20, | ||
"refreshTime": | "refreshTime": 30, | ||
"renderVisibleOnly": true, | "renderVisibleOnly": true, | ||
"refreshVisibleOnly": true, | "refreshVisibleOnly": true, | ||
Line 204: | Line 328: | ||
] | ] | ||
], | ], | ||
"mediaQuery": "(min-width: 1025px), (min-width: 768px) and (max-width: 1024px), (min-width: 320px) and (max-width: 767px)" | "mediaQuery": "(min-width: 1025px), (min-width: 768px) and (max-width: 1024px), (min-width: 320px) and (max-width: 767px)", | ||
"geoDeny": [ | |||
"AU" | |||
] | |||
}); | }); | ||
Line 210: | Line 337: | ||
/*AnchorBottom*/ | /*AnchorBottom*/ | ||
window['nitroAds'].createAd('anchorBottom', { | window['nitroAds'].createAd('anchorBottom', { | ||
"refreshLimit": | "refreshLimit": 20, | ||
"refreshTime": 30, | "refreshTime": 30, | ||
"format": "anchor", | "format": "anchor", | ||
Line 221: | Line 348: | ||
window['nitroAds'].createAd('Ads-InfoboxTop', { | window['nitroAds'].createAd('Ads-InfoboxTop', { | ||
"refreshLimit": 20, | "refreshLimit": 20, | ||
"refreshTime": | "refreshTime": 30, | ||
"renderVisibleOnly": true, | "renderVisibleOnly": true, | ||
"refreshVisibleOnly": true, | "refreshVisibleOnly": true, | ||
Line 228: | Line 355: | ||
"300", | "300", | ||
"250" | "250" | ||
], | |||
[ | |||
"320", | |||
"50" | |||
], | |||
[ | |||
"320", | |||
"100" | |||
] | ] | ||
], | ], | ||
"mediaQuery": "(min-width: 1025px), (min-width: | "mediaQuery": "(min-width: 1025px), (min-width: 800px) and (max-width: 1024px)" | ||
}); | }); | ||
/* Ad Block*/ | /* Ad Block*/ |
Latest revision as of 00:42, 5 October 2024
/* Any JavaScript here will be loaded for all users on every page load. importScript('User:Rillke/bigChunkedUpload.js');*/
/* Check For Ad Block*/
/*mw.loader.load( 'https://www.gamebrew.org/index.php?title=MediaWiki:Blockadblock.js&action==raw&ctype=text/javascript' );*/
/*Disable Scrolling*/
var keys = {37: 1, 38: 1, 39: 1, 40: 1};
function preventDefault(e) {
e.preventDefault();
}
function preventDefaultForScrollKeys(e) {
if (keys[e.keyCode]) {
preventDefault(e);
return false;
}
}
var supportsPassive = false;
try {
window.addEventListener("test", null, Object.defineProperty({}, 'passive', {
get: function () { supportsPassive = true; }
}));
} catch(e) {}
var wheelOpt = supportsPassive ? { passive: false } : false;
var wheelEvent = 'onwheel' in document.createElement('div') ? 'wheel' : 'mousewheel';
function disableScroll() {
window.addEventListener('DOMMouseScroll', preventDefault, false);
window.addEventListener(wheelEvent, preventDefault, wheelOpt);
window.addEventListener('touchmove', preventDefault, wheelOpt);
window.addEventListener('keydown', preventDefaultForScrollKeys, false);
}
function enableScroll() {
window.removeEventListener('DOMMouseScroll', preventDefault, false);
window.removeEventListener(wheelEvent, preventDefault, wheelOpt);
window.removeEventListener('touchmove', preventDefault, wheelOpt);
window.removeEventListener('keydown', preventDefaultForScrollKeys, false);
}
disableScroll();
setTimeout(enableScroll, 2000);
/*Banner-Top*/
window['nitroAds'].createAd('banner-top-desktop-ipad', {
"refreshLimit": 20,
"refreshTime": 30,
"renderVisibleOnly": true,
"refreshVisibleOnly": true,
"sizes": [
[
"728",
"90"
],
[
"970",
"90"
],
[
"320",
"100"
],
[
"320",
"50"
]
],
"mediaQuery": "(min-width: 1025px), (min-width: 768px) and (max-width: 1024px)",
"geoDeny": [
"AU"
]
});
window['nitroAds'].createAd('banner-top-mobile', {
"refreshLimit": 20,
"refreshTime": 30,
"renderVisibleOnly": true,
"refreshVisibleOnly": true,
"sizes": [
[
"300",
"250"
],
[
"336",
"280"
],
[
"320",
"50"
],
[
"320",
"100"
]
],
"mediaQuery": "(min-width: 320px) and (max-width: 767px)"
});
/*Banner-Bottom*/
window['nitroAds'].createAd('banner-bottom-mobile', {
"refreshLimit": 20,
"refreshTime": 30,
"renderVisibleOnly": true,
"refreshVisibleOnly": true,
"sizes": [
[
"300",
"250"
],
[
"336",
"280"
],
[
"320",
"50"
],
[
"320",
"100"
]
],
"mediaQuery": "(min-width: 320px) and (max-width: 767px)"
});
window['nitroAds'].createAd('banner-bottom-desktop-ipad', {
"refreshLimit": 20,
"refreshTime": 30,
"renderVisibleOnly": true,
"refreshVisibleOnly": true,
"sizes": [
[
"300",
"250"
],
[
"336",
"280"
],
[
"970",
"250"
]
],
"mediaQuery": "(min-width: 1025px), (min-width: 768px) and (max-width: 1024px)"
});
/* Ads in Content Script*/
window['nitroAds'].createAd('mw-content-text', {
"refreshLimit": 20,
"refreshTime": 30,
"format": "article",
"pageInterval": 3,
"sizes": [
[
"300",
"250"
],
[
"336",
"280"
],
[
"320",
"50"
],
[
"320",
"100"
]
],
"mediaQuery": "(min-width: 320px) and (max-width: 767px)"
});
/* Ads in AnchorText Script*/
window['nitroAds'].createAd('AnchorText-mobile', {
"refreshLimit": 20,
"refreshTime": 30,
"format": "anchor",
"anchor": "top",
"anchorPersistClose": false,
"mediaQuery": "(min-width: 320px) and (max-width: 767px)"
});
/* Video Script - Desktop and Ipad Only*/
window['nitroAds'].createAd('Videoplayer', {
"format": "video-nc",
"video": {
"float": "auto",
"mobile": "compact",
"initialDelay": 1
}
});
/*
$(document).ready(function() {
var videoHtml = '<div id="Videoplayer"></div>';
$('body').append(videoHtml);
});
window['nitroAds'].createAd('videoplayer3', {
"format": "video-nc",
"video": {
"mobile": "compact"
}
});
*/
/* Outstream
window['nitroAds'].createAd('videoplayer2', {
"refreshLimit": 0,
"refreshTime": 30,
"format": "floating"
});
*/
/*Fixed Small Banner Top*/
window['nitroAds'].createAd('small-banner-top', {
"refreshLimit": 20,
"refreshTime": 30,
"renderVisibleOnly": true,
"refreshVisibleOnly": true,
"sizes": [
[
"320",
"50"
]
],
"mediaQuery": "(min-width: 1025px), (min-width: 768px) and (max-width: 1024px)"
});
/*Sidebar-Sticky*/
window['nitroAds'].createAd('sidebar-sticky', {
"refreshLimit": 20,
"refreshTime": 30,
"renderVisibleOnly": true,
"refreshVisibleOnly": true,
"sizes": [
[
"160",
"600"
]
],
"mediaQuery": "(min-width: 1200px), (min-width: 1200px) and (max-width: 1200px)"
});
/*Ads-Infobox*/
window['nitroAds'].createAd('Ads-Infobox', {
"refreshLimit": 20,
"refreshTime": 30,
"renderVisibleOnly": true,
"refreshVisibleOnly": true,
"sizes": [
[
"300",
"250"
],
[
"336",
"280"
],
[
"320",
"50"
],
[
"320",
"100"
]
],
"mediaQuery": "(min-width: 1025px), (min-width: 768px) and (max-width: 1024px), (min-width: 320px) and (max-width: 767px)",
"geoDeny": [
"AU"
]
});
window['nitroAds'].createAd('Ads-Infobox1', {
"refreshLimit": 20,
"refreshTime": 30,
"renderVisibleOnly": true,
"refreshVisibleOnly": true,
"sizes": [
[
"320",
"50"
]
],
"mediaQuery": "(min-width: 1025px), (min-width: 768px) and (max-width: 1024px), (min-width: 320px) and (max-width: 767px)",
"geoDeny": [
"AU"
]
});
window['nitroAds'].createAd('Ads-Infobox3', {
"refreshLimit": 20,
"refreshTime": 30,
"renderVisibleOnly": true,
"refreshVisibleOnly": true,
"sizes": [
[
"320",
"50"
]
],
"mediaQuery": "(min-width: 1025px), (min-width: 768px) and (max-width: 1024px), (min-width: 320px) and (max-width: 767px)"
});
/* Large Mobile Banner*/
window['nitroAds'].createAd('largemobilebanner', {
"refreshLimit": 20,
"refreshTime": 30,
"renderVisibleOnly": true,
"refreshVisibleOnly": true,
"sizes": [
[
"320",
"50"
]
],
"mediaQuery": "(min-width: 1025px), (min-width: 768px) and (max-width: 1024px), (min-width: 320px) and (max-width: 767px)",
"geoDeny": [
"AU"
]
});
/*AnchorBottom*/
window['nitroAds'].createAd('anchorBottom', {
"refreshLimit": 20,
"refreshTime": 30,
"format": "anchor",
"anchor": "bottom",
"anchorPersistClose": false,
"mediaQuery": "(min-width: 1025px), (min-width: 1000px) and (max-width: 1024px)"
});
/*Ads-InfoboxTop*/
window['nitroAds'].createAd('Ads-InfoboxTop', {
"refreshLimit": 20,
"refreshTime": 30,
"renderVisibleOnly": true,
"refreshVisibleOnly": true,
"sizes": [
[
"300",
"250"
],
[
"320",
"50"
],
[
"320",
"100"
]
],
"mediaQuery": "(min-width: 1025px), (min-width: 800px) and (max-width: 1024px)"
});
/* Ad Block*/