-
Notifications
You must be signed in to change notification settings - Fork 11
/
script.js
74 lines (71 loc) · 2.52 KB
/
script.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
function switchStylesheet(newStylesheet) { //switches styles
var link = document.getElementById('stylesheet');
link.href = newStylesheet;
}
function newpage(url) {
window.location.href = url;
}
function aboutblanker() {
const iframe = document.getElementById('hiddenIframe');
var newWindow = window.open('about:blank');
if (newWindow) {
window.location.replace("https://www.google.com/webhp?igu=1");
var uURL = new URL('/gversion/mainsite.html', location.origin + location.pathname).href;
newWindow.document.open();
newWindow.document.write(`
<!DOCTYPE html>
<html>
<head>
<style>
html, body {
margin: 0;
padding: 0;
overflow: hidden;
height: 100%;
width: 100%;
}
iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border: none;
}
</style>
</head>
<body>
<iframe src="${uURL}" frameborder="0"></iframe>
</body>
</html>
`);
newWindow.document.close();
} else {
console.error('Failed to open a new window.');
}
}
document.addEventListener('DOMContentLoaded', () => {
const secretCode = window.config.entryPhrase;
const alternatecode = window.config.blanker;
const ifproxy = window.config.useproxy
let input = '';
document.addEventListener('keydown', (event) => {
input += event.key;
// if statement to track inputs to switch styles and content on the site
if (input.endsWith(secretCode) && ifproxy == "true") {
document.getElementById('guard').style.display = 'none'
switchStylesheet('truth.css')
document.getElementById('secretContent').style.display = 'block';
}
if (input.endsWith(alternatecode) && ifproxy == "true") {
aboutblanker();
}
//optional
if (input.length > secretCode.length) {
input = input.slice(-secretCode.length);
}
if (input.endsWith(secretCode) && ifproxy == "false") {
aboutblanker()
}
});
});