Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
OutRed
GitHub Repository: OutRed/artclass
Path: blob/main/static/js/blank.js
595 views
1
console.log(localStorage.getItem("cloaking"))
2
if (window.top !== window.self) {
3
4
} else if (localStorage.getItem("cloaking") == "enabled" || !localStorage.getItem("cloaking")) {
5
document.querySelector("html").innerHTML = `
6
<!DOCTYPE html>
7
<html lang=en>
8
<meta charset=utf-8>
9
<meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width">
10
<title>Error 404 (Not Found)!!1</title>
11
<style>
12
*{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}@media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}#logo{background:url(//www.google.com/images/branding/googlelogo/1x/googlelogo_color_150x54dp.png) no-repeat;margin-left:-5px}@media only screen and (min-resolution:192dpi){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat 0% 0%/100% 100%;-moz-border-image:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) 0}}@media only screen and (-webkit-min-device-pixel-ratio:2){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat;-webkit-background-size:100% 100%}}#logo{display:inline-block;height:54px;width:150px}
13
</style>
14
<a href=//www.google.com/><span id=logo aria-label=Google></span></a>
15
<p><b>404.</b> <ins>That’s not an error.<br> This page is just to notify people about this new change. (This page will go away in a few days) <br>Click the \` key to continue to Art Class!<br>You can disable or enable this in Settings.</ins>
16
<p>The requested URL <code>${window.location.pathname}</code> was not found on this server. <ins>That’s all we know.</ins>
17
18
document.addEventListener("keydown", (event) => {
19
if (event.key !== `${localStorage.getItem("cloakkey") || '`'}`) return
20
blank()
21
})
22
}
23
24
function blank() {
25
const url = location.href;
26
const width = window.innerWidth;
27
const height = window.innerHeight;
28
29
let inFrame;
30
31
try {
32
inFrame = window !== top;
33
} catch (e) {
34
inFrame = true;
35
}
36
37
if (!inFrame && !navigator.userAgent.includes("Firefox")) {
38
const popup = window.open('about:blank', '_blank');
39
if (!popup || popup.closed) {
40
alert("Unable to launch! Make sure you have pop-ups or redirects enabled in your browser.");
41
} else {
42
const doc = popup.document;
43
const iframe = doc.createElement("iframe");
44
const style = iframe.style;
45
const link = doc.createElement("link");
46
47
48
iframe.src = url;
49
style.position = "fixed";
50
style.top = style.bottom = style.left = style.right = 0;
51
style.border = style.outline = "none";
52
style.width = style.height = "100%";
53
54
doc.head.appendChild(link);
55
doc.body.appendChild(iframe);
56
//window.location.replace("https://classroom.google.com");
57
}
58
}
59
}
60
61
62