This repository has been archived by the owner on Oct 4, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathaboutblank.html
94 lines (82 loc) · 2.81 KB
/
aboutblank.html
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<html>
<head>
<style>
html {
margin-top: 15px;
background-color: #000000;
color: white;
font-family: 'Rubik', sans-serif;
text-align: center;
}
h1 {
position: absolute;
top: 45%;
right: 50%;
transform: translate(50%);
font-weight: 100;
font-size: 1.5rem;
}
button {
padding: 20px 40px 20px 40px;
height: auto;
border: none;
color: var(--light-color);
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 1.3rem;
font-family: 'Rubik', sans-serif;
cursor: pointer;
background-color: #f75dfc;
border-radius: 20px;
transition: opacity 0.3s ease;
transition: transform 0.1s ease;
margin-top: 200px;
}
button:hover {
transform: scale(1.05);
}
</style>
</head>
<body>
<h1>Press [Enter] or tap/click anywhere to redirect</h1>
<script>
function Go() {
let url = document.hostname;
maskedWindow = window.open();
const doc = maskedWindow.document;
doc.title = '';
let embed = doc.createElement('embed');
if (url.includes('https://') || url.includes('http://')) {
embed.src = url;
} else {
embed.src = 'https://' + url;
}
embed.width = '100%';
embed.height = '100%';
embed.style.position = 'fixed';
embed.style.top = '0';
embed.style.left = '0';
let script = document.createElement('script');
script.innerHTML = `
window.onbeforeunload = function() {
return "reloading the site will end the aboutblank session. Are you sure you want to continue?";
};
`;
doc.body.appendChild(embed);
doc.body.appendChild(script);
window.location.href = 'https://google.com';
window.close();
}
document.addEventListener('keyup', (event) => {
if (event.keyCode === 13) {
Go();
}
});
document.body.addEventListener('click', () => {
Go();
});
Go();
</script>
</body>
</html>