|
|
| Line 124: |
Line 124: |
|
| |
|
| /* Ad Block*/ | | /* Ad Block*/ |
| "use strict";
| |
|
| |
| (function () {
| |
| var a = {
| |
| bgColor: "#fff",
| |
| fgColor: "#1b1b1b",
| |
| linkBgColor: "#0069c0",
| |
| linkFgColor: "#fff",
| |
| logo: "",
| |
| dismissable: !0,
| |
| interval: 3600,
| |
| delay: 0,
| |
| sponsorUrl: "",
| |
| sponsorButton: "Purchase a Subscription",
| |
| callout: "Please disable your browser's ad-blocker",
| |
| appeal: "Without advertising, this website wouldn't exist."
| |
| };
| |
| a = {
| |
| logo: "https://www.gamebrew.org/images/2/2b/B1.png",
| |
| bgColor: "#fff",
| |
| fgColor: "#1b1b1b",
| |
| linkBgColor: "#0069c0",
| |
| linkFgColor: "#fff",
| |
| dismissable: !1,
| |
| delay: 5,
| |
| interval: 0,
| |
| sponsorUrl: "",
| |
| sponsorButton: "",
| |
| callout: "Please disable your browser's ad-blocker.",
| |
| appeal: "It looks like you're using an ad-blocker! If you enjoy our content, please support our site by disabling your adblocker."
| |
| };
| |
| var b = new function () {
| |
| function a() {
| |
| if (window.nitroAds && !0 === window.nitroAds.abp) return void d();
| |
| var e = new Image();
| |
| e.onerror = function () {
| |
| if (c++, 3 > c) setTimeout(a, 250);else {
| |
| b.blocking = !0;
| |
| try {
| |
| localStorage.setItem("np.lastBlocked", new Date().getTime());
| |
| } catch (a) {}
| |
| document.dispatchEvent && window.CustomEvent && document.dispatchEvent(new CustomEvent("np.detect", {
| |
| detail: {
| |
| blocking: b.blocking
| |
| }
| |
| }));
| |
| }
| |
| }, e.onload = function () {
| |
| return d();
| |
| }, e.src = "https://ad-delivery.net/px.gif?ch=1&" + Math.random() + "&adslot=";
| |
| }
| |
| this.blocking = !1;
| |
| var c = 0,
| |
| d = function d() {
| |
| try {
| |
| var a = localStorage.getItem("np.lastBlocked");
| |
| a && (localStorage.removeItem("np.lastBlocked"), localStorage.setItem("np.unblocked", new Date().getTime() - +a));
| |
| } catch (a) {}
| |
| };
| |
| setTimeout(a(), 250);
| |
| }();
| |
| var c = null;
| |
| var d = function d() {
| |
| var b = "; ".concat(document.cookie),
| |
| d = b.split("; npabp=");
| |
| if (2 === d.length && a.dismissable) return;
| |
| var e = "";
| |
| if (a.interval) {
| |
| var _b = new Date();
| |
| _b.setTime(_b.getTime() + 1e3 * a.interval), e = "expires=".concat(_b.toGMTString(), ";");
| |
| }
| |
| document.cookie = "npabp=1; ".concat(e, " path=/;");
| |
| var f = window.matchMedia("(max-width: 768px)").matches;
| |
| c = document.createElement("div"), c.style.background = "rgba(78, 78, 78, 0.6)", c.style.position = "fixed", c.style.display = "flex", c.style.alignItems = "center", c.style.justifyContent = "center", c.style.top = 0, c.style.left = 0, c.style.right = 0, c.style.bottom = 0, c.style.zIndex = 2147483647, a.dismissable && c.addEventListener("click", function (a) {
| |
| c && a.target == c && c.parentNode && c.parentNode.removeChild(c);
| |
| });
| |
| var g = document.createElement("div");
| |
| g.style.width = f ? "300px" : "720px", g.style.boxShadow = "0px 0px 8px 0px rgba(52, 52, 52, 0.6)", g.style.borderRadius = "2px", g.style.overflow = "hidden", g.style.fontSize = "0", g.style.display = "flex", c.appendChild(g);
| |
| var h = document.createElement("div");
| |
| if (h.style.background = a.bgColor, h.style.width = f ? "300px" : "720px", h.style.flex = f ? "0 0 300px" : "0 0 720px", h.style.display = "inline-block", h.style.textAlign = "center", h.style.padding = f ? "15px" : "30px 0", h.style.boxSizing = "border-box", h.style.position = "relative", g.appendChild(h), a.dismissable) {
| |
| var _b2 = document.createElement("div");
| |
| _b2.innerHTML = "<svg style=\"fill:".concat(a.linkBgColor, ";\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path d=\"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"/></svg>"), _b2.style.position = "absolute", _b2.style.width = "24px", _b2.style.height = "24px", _b2.style.top = "10px", _b2.style.right = "10px", _b2.style.cursor = "pointer", h.appendChild(_b2), _b2.addEventListener("click", function () {
| |
| c && c.parentNode && c.parentNode.removeChild(c);
| |
| });
| |
| }
| |
| if (a.logo) {
| |
| var _b3 = document.createElement("img");
| |
| _b3.style.maxHeight = "50px", _b3.style.maxWidth = "600px", _b3.style.marginBottom = f ? "6px" : "15px", _b3.src = a.logo, h.appendChild(_b3);
| |
| }
| |
| var i = document.createElement("span");
| |
| i.style.display = "block", i.style.fontSize = f ? "16px" : "20px", i.style.fontWeight = "bold", i.style.fontFamily = "\"Roboto\", Helvetica, sans-serif", i.style.marginBottom = f ? "6px" : "15px", i.style.color = a.fgColor, i.innerText = a.callout, h.appendChild(i);
| |
| var j = document.createElement("span");
| |
| j.style.display = "block", j.style.fontSize = f ? "14px" : "16px", j.style.fontWeight = "400", j.style.fontFamily = "\"Roboto\", Helvetica, sans-serif", j.style.marginBottom = f ? "15px" : "30px", j.style.color = a.fgColor, j.innerText = a.appeal, h.appendChild(j);
| |
| var k = document.createElement("div");
| |
| if (k.style.display = "flex", k.style.justifyContent = "center", k.style.alignItems = "center", h.appendChild(k), a.sponsorUrl) {
| |
| var _b4 = document.createElement("span");
| |
| _b4.style.display = "inline-block", _b4.style.cursor = "pointer", _b4.style.borderRadius = "2px", _b4.style.fontSize = f ? "14px" : "16px", _b4.style.fontWeight = "500", _b4.style.fontFamily = "\"Roboto\", Helvetica, sans-serif", _b4.style.padding = f ? "5px 10px" : "10px 18px", _b4.style.marginRight = f ? "5px" : "20px", _b4.style.backgroundColor = a.linkBgColor, _b4.style.color = a.linkFgColor, _b4.innerText = a.sponsorButton, _b4.addEventListener("click", function (b) {
| |
| b.preventDefault(), window.location = a.sponsorUrl;
| |
| }), k.appendChild(_b4);
| |
| }
| |
| var l = document.createElement("span");
| |
| l.style.display = "inline-block", l.style.cursor = "pointer", l.style.borderRadius = "2px", l.style.fontSize = f ? "14px" : "16px", l.style.fontWeight = "500", l.style.fontFamily = "\"Roboto\", Helvetica, sans-serif", l.style.padding = f ? "5px 10px" : "10px 18px", a.sponsorUrl && (l.style.marginLeft = f ? "5px" : "20px"), l.style.backgroundColor = a.linkBgColor, l.style.color = a.linkFgColor, l.innerText = "Need Help?", k.appendChild(l);
| |
| var m = function m(b) {
| |
| if (p.innerHTML = "", b.gif) {
| |
| var _a = document.createElement("img");
| |
| _a.src = "https://storage.googleapis.com/np-assets/".concat(b.id, ".gif"), _a.style.width = f ? "100px" : "200px", _a.style.float = "right", _a.style.border = "1px solid rgba(134, 134, 134, 0.31)", _a.style.borderRadius = "4px", _a.style.margin = "0 0 10px 15px", p.appendChild(_a);
| |
| }
| |
| var c = document.createElement("span");
| |
| c.style.display = "block", c.style.fontSize = "16px", c.style.fontWeight = "bold", c.style.fontFamily = "\"Roboto\", Helvetica, sans-serif", c.style.marginBottom = "15px", c.style.color = a.fgColor, c.innerText = b.name, p.appendChild(c), b.steps.forEach(function (b) {
| |
| var c = document.createElement("span");
| |
| c.style.display = "block", c.style.fontSize = "14px", c.style.fontWeight = "regular", c.style.fontFamily = "\"Roboto\", Helvetica, sans-serif", c.style.marginBottom = "3px", c.style.color = a.fgColor, c.innerText = "- ".concat(b), p.appendChild(c);
| |
| });
| |
| var d = document.createElement("span");
| |
| d.style.display = "inline-block", d.style.cursor = "pointer", d.style.borderRadius = "2px", d.style.fontSize = "14px", d.style.fontWeight = "500", d.style.fontFamily = "\"Roboto\", Helvetica, sans-serif", d.style.padding = "6px 10px", d.style.marginTop = "30px", d.style.marginRight = "5px", d.style.backgroundColor = a.linkBgColor, d.style.color = a.linkFgColor, d.innerText = "Refresh Page", d.addEventListener("click", function (a) {
| |
| a.preventDefault(), window.location.reload();
| |
| }), p.appendChild(d);
| |
| var e = document.createElement("span");
| |
| e.style.display = "inline-block", e.style.cursor = "pointer", e.style.borderRadius = "2px", e.style.fontSize = "14px", e.style.fontWeight = "500", e.style.fontFamily = "\"Roboto\", Helvetica, sans-serif", e.style.padding = "6px 10px", e.style.marginTop = "6px", e.style.backgroundColor = a.linkBgColor, e.style.color = a.linkFgColor, e.innerText = "Back to Main", e.addEventListener("click", function (a) {
| |
| a.preventDefault(), h.style.marginLeft = "0", g.style.height = "auto", n.style.height = "0";
| |
| }), p.appendChild(e);
| |
| };
| |
| l.addEventListener("click", function (b) {
| |
| b.preventDefault(), h.style.marginLeft = f ? "-300px" : "-720px", g.style.height = f ? "80vh" : "420px", n.style.height = f ? "80vh" : "420px", fetch("https://storage.googleapis.com/np-assets/manifest.json?v=b2").then(function (a) {
| |
| return a.json();
| |
| }).then(function (c) {
| |
| o.innerHTML = "";
| |
| var d = document.createElement("span");
| |
| if (d.style.display = "block", d.style.fontSize = "15px", d.style.fontWeight = "bold", d.style.fontFamily = "\"Roboto\", Helvetica, sans-serif", d.style.marginBottom = f ? "6px" : "15px", d.style.color = a.linkFgColor, d.innerText = "Which ad blocker do you use?", o.appendChild(d), f) {
| |
| var _a2 = document.createElement("select");
| |
| _a2.style.fontSize = "14px", _a2.addEventListener("change", function (a) {
| |
| var d = a.target.options[a.target.selectedIndex].value,
| |
| e = c.find(function (a) {
| |
| return a.id == d;
| |
| });
| |
| m(e);
| |
| }), o.appendChild(_a2), c.forEach(function (b) {
| |
| var c = document.createElement("option");
| |
| c.value = b.id, c.textContent = b.name, _a2.appendChild(c);
| |
| });
| |
| } else c.forEach(function (b) {
| |
| var c = document.createElement("span");
| |
| c.style.display = "block", c.style.cursor = "pointer", c.style.fontSize = "14px", c.style.fontWeight = "regular", c.style.fontFamily = "\"Roboto\", Helvetica, sans-serif", c.style.padding = "4px 0px", c.style.backgroundColor = a.linkBgColor, c.style.color = a.linkFgColor, c.style.opacity = "0.8", c.style.borderBottom = "1px solid rgba(218, 218, 218, 0.14)", c.innerText = b.name, o.appendChild(c), c.addEventListener("click", function (a) {
| |
| a.preventDefault(), m(b);
| |
| });
| |
| });
| |
| 0 < c.length && m(c[0]);
| |
| });
| |
| });
| |
| var n = document.createElement("div");
| |
| n.style.background = a.bgColor, n.style.display = "flex", n.style.width = f ? "300px" : "720px", n.style.height = "50px", n.style.flex = f ? "300px" : "0 0 720px", n.style.textAlign = "left", n.style.padding = "0", n.style.whiteSpace = "normal", f && (n.style.flexDirection = "column"), g.appendChild(n);
| |
| var o = document.createElement("div");
| |
| o.style.background = a.linkBgColor, o.style.flex = f ? "0 0 110px" : "0 0 200px", o.style.textAlign = "left", o.style.padding = f ? "15px" : "30px", o.style.overflow = "auto", n.appendChild(o);
| |
| var p = document.createElement("div");
| |
| p.style.background = a.bgColor, p.style.flex = "1", p.style.textAlign = "left", p.style.padding = f ? "15px" : "30px", p.style.overflow = "auto", n.appendChild(p), null !== document.body && document.body.appendChild(c);
| |
| };
| |
| document.addEventListener("np.detect", function (b) {
| |
| b.detail.blocking ? setTimeout(d, a.delay) : c && c.parentNode && c.parentNode.removeChild(c);
| |
| });
| |
| })();
| |
/* 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( '/index.php?title=MediaWiki:Blockadblock.js&action==raw&ctype=text/javascript' );*/
/* Top Banner Script*/
window['nitroAds'].createAd('banner-top', {
"refreshLimit": 10,
"refreshTime": 30,
"renderVisibleOnly": true,
"refreshVisibleOnly": true,
"sizes": [
[
"728",
"90"
],
[
"970",
"90"
],
[
"970",
"250"
],
[
"300",
"250"
],
[
"336",
"280"
],
[
"320",
"50"
],
[
"320",
"100"
]
]
});
/* Bottom Banner Script*/
window['nitroAds'].createAd('banner-bottom', {
"refreshLimit": 10,
"refreshTime": 30,
"renderVisibleOnly": true,
"refreshVisibleOnly": true,
"sizes": [
[
"728",
"90"
],
[
"970",
"90"
],
[
"970",
"250"
],
[
"300",
"250"
],
[
"336",
"280"
],
[
"320",
"50"
],
[
"320",
"100"
]
]
});
/* Ads in Content Script*/
window['nitroAds'].createAd('mw-content-text', {
"refreshLimit": 10,
"refreshTime": 30,
"format": "article",
"pageInterval": 2
});
/* Ads in interstitial Script*/
window['nitroAds'].createAd('interstitial', {
"format": "interstitial",
"mediaQuery": "(min-width: 1025px), (min-width: 768px) and (max-width: 1024px), (min-width: 320px) and (max-width: 767px)"
});
/* Ads in AnchorText Script*/
window['nitroAds'].createAd('AnchorText', {
"refreshLimit": 10,
"refreshTime": 30,
"format": "anchor",
"anchor": "bottom",
"anchorPersistClose": false,
"report": {
"enabled": true,
"icon": false,
"wording": "Report Ad",
"position": "bottom-right-side"
},
"mediaQuery": "(min-width: 1025px), (min-width: 768px) and (max-width: 1024px), (min-width: 320px) and (max-width: 767px)"
});
/* Video Script
window['nitroAds'].createAd('Videoplayer', {
"format": "video-nc",
"mediaQuery": "(min-width: 1025px), (min-width: 768px) and (max-width: 1024px), (min-width: 320px) and (max-width: 767px)",
"video": {
"float": "always",
"mobile": "compact",
"initialDelay": 1
}
});
*/
/* Ad Block*/