-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathexit.js
50 lines (44 loc) · 1.87 KB
/
exit.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
"use strict";
(async () => {
window.onerror = (e, source, lineno, colno, err) => {
let msg = "Unhandled error at " + (source || "unknown source ");
if (lineno != null)
msg += lineno;
if (colno != null)
msg += ":" + colno;
if (err != null)
msg += "\n\n" + err;
alert(msg, "Error");
};
document.onkeydown = (e) => {
if (e.ctrlKey && !e.altKey && !e.metaKey && !e.shiftKey) {
switch (e.key) {
case "q":
e.preventDefault();
e.stopPropagation();
window.location.replace("https://www.google.com/webhp?igu=1");
break;
}
}
};
})();
function reloadIframe() {
const iframe = document.getElementById('hiddenIframe');
iframe.src = iframe.src;
}
function swapIframe() {
const timestamp = new Date().getTime();
const iframe = document.getElementById('hiddenIframe');
const currentSrc = iframe.src;
const proxyLink = window.config.proxyLink;
if (currentSrc.includes(proxyLink)) {
iframe.src = window.config.alternativeproxy + "?t=" + timestamp;
console.log("Swapped to alternative proxy");
} else {
iframe.src = window.config.proxyLink + "?t=" + timestamp;
console.log("Swapped to proxy link");
}
// Print the new iframe src
console.log("Current iframe src: " + iframe.src);
}
// taken from T-Crack