More actions
No edit summary |
No edit summary |
||
Line 15: | Line 15: | ||
callout: "Please disable your browser's ad-blocker", | callout: "Please disable your browser's ad-blocker", | ||
appeal: `Without advertising, this website wouldn't exist.`, | appeal: `Without advertising, this website wouldn't exist.`, | ||
} | } | ||
a = { | a = { | ||
logo: "https://www.gamebrew.org/images/2/2b/B1.png", | logo: "https://www.gamebrew.org/images/2/2b/B1.png", | ||
Line 29: | Line 29: | ||
callout: "Please disable your browser's ad-blocker.", | 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.", | 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 () { | var b = new (function () { | ||
function a() { | function a() { | ||
if (window.nitroAds && !0 === window.nitroAds.abp) return void d() | if (window.nitroAds && !0 === window.nitroAds.abp) return void d() | ||
var e = new Image() | var e = new Image() | ||
(e.onerror = () => { | (e.onerror = () => { | ||
if ((c++, 3 > c)) setTimeout(a, 250) | if ((c++, 3 > c)) setTimeout(a, 250) | ||
else { | else { | ||
b.blocking = !0 | b.blocking = !0 | ||
try { | try { | ||
localStorage.setItem("np.lastBlocked", new Date().getTime()) | localStorage.setItem("np.lastBlocked", new Date().getTime()) | ||
} catch (a) {} | } catch (a) {} | ||
document.dispatchEvent && window.CustomEvent && document.dispatchEvent(new CustomEvent("np.detect", { detail: { blocking: b.blocking } })) | document.dispatchEvent && window.CustomEvent && document.dispatchEvent(new CustomEvent("np.detect", { detail: { blocking: b.blocking } })) | ||
} | } | ||
}), | }), | ||
(e.onload = () => d()), | (e.onload = () => d()), | ||
(e.src = "https://ad-delivery.net/px.gif?ch=1&" + Math.random() + "&adslot=") | (e.src = "https://ad-delivery.net/px.gif?ch=1&" + Math.random() + "&adslot=") | ||
} | } | ||
this.blocking = !1 | this.blocking = !1 | ||
var c = 0, | var c = 0, | ||
d = function () { | d = function () { | ||
try { | try { | ||
var a = localStorage.getItem("np.lastBlocked") | var a = localStorage.getItem("np.lastBlocked") | ||
a && (localStorage.removeItem("np.lastBlocked"), localStorage.setItem("np.unblocked", new Date().getTime() - +a)) | a && (localStorage.removeItem("np.lastBlocked"), localStorage.setItem("np.unblocked", new Date().getTime() - +a)) | ||
} catch (a) {} | } catch (a) {} | ||
} | } | ||
setTimeout(a(), 250) | setTimeout(a(), 250) | ||
})() | })() | ||
let c = null | let c = null | ||
const d = () => { | const d = () => { | ||
const b = ` | const b = ` ${document.cookie}`, | ||
d = b.split(` | d = b.split(` npabp=`) | ||
if (2 === d.length && a.dismissable) return | if (2 === d.length && a.dismissable) return | ||
let e = "" | let e = "" | ||
if (a.interval) { | if (a.interval) { | ||
const b = new Date() | const b = new Date() | ||
b.setTime(b.getTime() + 1e3 * a.interval), (e = `expires=${b.toGMTString()} | b.setTime(b.getTime() + 1e3 * a.interval), (e = `expires=${b.toGMTString()}`) | ||
} | } | ||
document.cookie = `npabp=1 | document.cookie = `npabp=1 ${e} path=/` | ||
const f = window.matchMedia("(max-width: 768px)").matches | const f = window.matchMedia("(max-width: 768px)").matches | ||
(c = document.createElement("div")), | (c = document.createElement("div")), | ||
(c.style.background = "rgba(78, 78, 78, 0.6)"), | (c.style.background = "rgba(78, 78, 78, 0.6)"), | ||
Line 82: | Line 82: | ||
a.dismissable && | a.dismissable && | ||
c.addEventListener("click", (a) => { | c.addEventListener("click", (a) => { | ||
c && a.target == c && c.parentNode && c.parentNode.removeChild(c) | c && a.target == c && c.parentNode && c.parentNode.removeChild(c) | ||
}) | }) | ||
const g = document.createElement("div") | const g = document.createElement("div") | ||
(g.style.width = f ? "300px" : "720px"), | (g.style.width = f ? "300px" : "720px"), | ||
(g.style.boxShadow = "0px 0px 8px 0px rgba(52, 52, 52, 0.6)"), | (g.style.boxShadow = "0px 0px 8px 0px rgba(52, 52, 52, 0.6)"), | ||
Line 91: | Line 91: | ||
(g.style.fontSize = "0"), | (g.style.fontSize = "0"), | ||
(g.style.display = "flex"), | (g.style.display = "flex"), | ||
c.appendChild(g) | c.appendChild(g) | ||
const h = document.createElement("div") | const h = document.createElement("div") | ||
if ( | if ( | ||
((h.style.background = a.bgColor), | ((h.style.background = a.bgColor), | ||
Line 105: | Line 105: | ||
a.dismissable) | a.dismissable) | ||
) { | ) { | ||
const b = document.createElement("div") | const b = document.createElement("div") | ||
(b.innerHTML = `<svg style="fill:${a.linkBgColor} | (b.innerHTML = `<svg style="fill:${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>`), | ||
(b.style.position = "absolute"), | (b.style.position = "absolute"), | ||
(b.style.width = "24px"), | (b.style.width = "24px"), | ||
Line 115: | Line 115: | ||
h.appendChild(b), | h.appendChild(b), | ||
b.addEventListener("click", () => { | b.addEventListener("click", () => { | ||
c && c.parentNode && c.parentNode.removeChild(c) | c && c.parentNode && c.parentNode.removeChild(c) | ||
}) | }) | ||
} | } | ||
if (a.logo) { | if (a.logo) { | ||
const b = document.createElement("img") | const b = document.createElement("img") | ||
(b.style.maxHeight = "50px"), (b.style.maxWidth = "600px"), (b.style.marginBottom = f ? "6px" : "15px"), (b.src = a.logo), h.appendChild(b) | (b.style.maxHeight = "50px"), (b.style.maxWidth = "600px"), (b.style.marginBottom = f ? "6px" : "15px"), (b.src = a.logo), h.appendChild(b) | ||
} | } | ||
const i = document.createElement("span") | const i = document.createElement("span") | ||
(i.style.display = "block"), | (i.style.display = "block"), | ||
(i.style.fontSize = f ? "16px" : "20px"), | (i.style.fontSize = f ? "16px" : "20px"), | ||
Line 130: | Line 130: | ||
(i.style.color = a.fgColor), | (i.style.color = a.fgColor), | ||
(i.innerText = a.callout), | (i.innerText = a.callout), | ||
h.appendChild(i) | h.appendChild(i) | ||
const j = document.createElement("span") | const j = document.createElement("span") | ||
(j.style.display = "block"), | (j.style.display = "block"), | ||
(j.style.fontSize = f ? "14px" : "16px"), | (j.style.fontSize = f ? "14px" : "16px"), | ||
Line 139: | Line 139: | ||
(j.style.color = a.fgColor), | (j.style.color = a.fgColor), | ||
(j.innerText = a.appeal), | (j.innerText = a.appeal), | ||
h.appendChild(j) | h.appendChild(j) | ||
const k = document.createElement("div") | const k = document.createElement("div") | ||
if (((k.style.display = "flex"), (k.style.justifyContent = "center"), (k.style.alignItems = "center"), h.appendChild(k), a.sponsorUrl)) { | if (((k.style.display = "flex"), (k.style.justifyContent = "center"), (k.style.alignItems = "center"), h.appendChild(k), a.sponsorUrl)) { | ||
const b = document.createElement("span") | const b = document.createElement("span") | ||
(b.style.display = "inline-block"), | (b.style.display = "inline-block"), | ||
(b.style.cursor = "pointer"), | (b.style.cursor = "pointer"), | ||
Line 155: | Line 155: | ||
(b.innerText = a.sponsorButton), | (b.innerText = a.sponsorButton), | ||
b.addEventListener("click", (b) => { | b.addEventListener("click", (b) => { | ||
b.preventDefault(), (window.location = a.sponsorUrl) | b.preventDefault(), (window.location = a.sponsorUrl) | ||
}), | }), | ||
k.appendChild(b) | k.appendChild(b) | ||
} | } | ||
const l = document.createElement("span") | const l = document.createElement("span") | ||
(l.style.display = "inline-block"), | (l.style.display = "inline-block"), | ||
(l.style.cursor = "pointer"), | (l.style.cursor = "pointer"), | ||
Line 171: | Line 171: | ||
(l.style.color = a.linkFgColor), | (l.style.color = a.linkFgColor), | ||
(l.innerText = "Need Help?"), | (l.innerText = "Need Help?"), | ||
k.appendChild(l) | k.appendChild(l) | ||
const m = (b) => { | const m = (b) => { | ||
if (((p.innerHTML = ""), b.gif)) { | if (((p.innerHTML = ""), b.gif)) { | ||
const a = document.createElement("img") | const a = document.createElement("img") | ||
(a.src = `https://storage.googleapis.com/np-assets/${b.id}.gif`), | (a.src = `https://storage.googleapis.com/np-assets/${b.id}.gif`), | ||
(a.style.width = f ? "100px" : "200px"), | (a.style.width = f ? "100px" : "200px"), | ||
Line 181: | Line 181: | ||
(a.style.borderRadius = "4px"), | (a.style.borderRadius = "4px"), | ||
(a.style.margin = "0 0 10px 15px"), | (a.style.margin = "0 0 10px 15px"), | ||
p.appendChild(a) | p.appendChild(a) | ||
} | } | ||
const c = document.createElement("span") | const c = document.createElement("span") | ||
(c.style.display = "block"), | (c.style.display = "block"), | ||
(c.style.fontSize = "16px"), | (c.style.fontSize = "16px"), | ||
Line 193: | Line 193: | ||
p.appendChild(c), | p.appendChild(c), | ||
b.steps.forEach((b) => { | b.steps.forEach((b) => { | ||
const c = document.createElement("span") | const c = document.createElement("span") | ||
(c.style.display = "block"), | (c.style.display = "block"), | ||
(c.style.fontSize = "14px"), | (c.style.fontSize = "14px"), | ||
Line 201: | Line 201: | ||
(c.style.color = a.fgColor), | (c.style.color = a.fgColor), | ||
(c.innerText = `- ${b}`), | (c.innerText = `- ${b}`), | ||
p.appendChild(c) | p.appendChild(c) | ||
}) | }) | ||
const d = document.createElement("span") | const d = document.createElement("span") | ||
(d.style.display = "inline-block"), | (d.style.display = "inline-block"), | ||
(d.style.cursor = "pointer"), | (d.style.cursor = "pointer"), | ||
Line 217: | Line 217: | ||
(d.innerText = "Refresh Page"), | (d.innerText = "Refresh Page"), | ||
d.addEventListener("click", (a) => { | d.addEventListener("click", (a) => { | ||
a.preventDefault(), window.location.reload() | a.preventDefault(), window.location.reload() | ||
}), | }), | ||
p.appendChild(d) | p.appendChild(d) | ||
const e = document.createElement("span") | const e = document.createElement("span") | ||
(e.style.display = "inline-block"), | (e.style.display = "inline-block"), | ||
(e.style.cursor = "pointer"), | (e.style.cursor = "pointer"), | ||
Line 233: | Line 233: | ||
(e.innerText = "Back to Main"), | (e.innerText = "Back to Main"), | ||
e.addEventListener("click", (a) => { | e.addEventListener("click", (a) => { | ||
a.preventDefault(), (h.style.marginLeft = "0"), (g.style.height = "auto"), (n.style.height = "0") | a.preventDefault(), (h.style.marginLeft = "0"), (g.style.height = "auto"), (n.style.height = "0") | ||
}), | }), | ||
p.appendChild(e) | p.appendChild(e) | ||
} | } | ||
l.addEventListener("click", (b) => { | l.addEventListener("click", (b) => { | ||
b.preventDefault(), | b.preventDefault(), | ||
Line 245: | Line 245: | ||
.then((a) => a.json()) | .then((a) => a.json()) | ||
.then((c) => { | .then((c) => { | ||
o.innerHTML = "" | o.innerHTML = "" | ||
const d = document.createElement("span") | const d = document.createElement("span") | ||
if ( | if ( | ||
((d.style.display = "block"), | ((d.style.display = "block"), | ||
Line 258: | Line 258: | ||
f) | f) | ||
) { | ) { | ||
const a = document.createElement("select") | const a = document.createElement("select") | ||
(a.style.fontSize = "14px"), | (a.style.fontSize = "14px"), | ||
a.addEventListener("change", (a) => { | a.addEventListener("change", (a) => { | ||
const d = a.target.options[a.target.selectedIndex].value, | const d = a.target.options[a.target.selectedIndex].value, | ||
e = c.find((a) => a.id == d) | e = c.find((a) => a.id == d) | ||
m(e) | m(e) | ||
}), | }), | ||
o.appendChild(a), | o.appendChild(a), | ||
c.forEach((b) => { | c.forEach((b) => { | ||
const c = document.createElement("option") | const c = document.createElement("option") | ||
(c.value = b.id), (c.textContent = b.name), a.appendChild(c) | (c.value = b.id), (c.textContent = b.name), a.appendChild(c) | ||
}) | }) | ||
} else | } else | ||
c.forEach((b) => { | c.forEach((b) => { | ||
const c = document.createElement("span") | const c = document.createElement("span") | ||
(c.style.display = "block"), | (c.style.display = "block"), | ||
(c.style.cursor = "pointer"), | (c.style.cursor = "pointer"), | ||
Line 286: | Line 286: | ||
o.appendChild(c), | o.appendChild(c), | ||
c.addEventListener("click", (a) => { | c.addEventListener("click", (a) => { | ||
a.preventDefault(), m(b) | a.preventDefault(), m(b) | ||
}) | }) | ||
}) | }) | ||
0 < c.length && m(c[0]) | 0 < c.length && m(c[0]) | ||
}) | }) | ||
}) | }) | ||
const n = document.createElement("div") | const n = document.createElement("div") | ||
(n.style.background = a.bgColor), | (n.style.background = a.bgColor), | ||
(n.style.display = "flex"), | (n.style.display = "flex"), | ||
Line 302: | Line 302: | ||
(n.style.whiteSpace = "normal"), | (n.style.whiteSpace = "normal"), | ||
f && (n.style.flexDirection = "column"), | f && (n.style.flexDirection = "column"), | ||
g.appendChild(n) | g.appendChild(n) | ||
const o = document.createElement("div") | const 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) | (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) | ||
const p = document.createElement("div") | const 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) | (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", (b) => { | document.addEventListener("np.detect", (b) => { | ||
b.detail.blocking ? setTimeout(d, a.delay) : c && c.parentNode && c.parentNode.removeChild(c) | b.detail.blocking ? setTimeout(d, a.delay) : c && c.parentNode && c.parentNode.removeChild(c) | ||
}) | }) | ||
})() | })() | ||
</script> | </script> | ||
</html> | </html> |
Revision as of 11:59, 20 November 2022