-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathabout-blank.html
41 lines (36 loc) · 1.37 KB
/
about-blank.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<link rel="stylesheet" href="css/styles.css" />
<title>about:blank | Best Website</title>
</head>
<body>
<div class="center" style="font-family: Arial;">
<a onclick="cloak()"><h1>Click here to open in about:blank page.</h1></a>
<p>If you want to stop seeing this page, allow popups.</p>
</div>
<script>
function cloak() {
var urlObj = new window.URL(window.location.href);
var cleanUrl = urlObj.origin + urlObj.pathname; // Keep base URL and path
// Open new blank window
var win = window.open();
win.document.body.style.margin = "0";
win.document.body.style.height = "100vh";
var iframe = win.document.createElement("iframe");
iframe.style.border = "none";
iframe.style.width = "100%";
iframe.style.height = "100%";
iframe.style.margin = "0";
iframe.referrerPolicy = "no-referrer";
iframe.allow = "fullscreen";
iframe.src = cleanUrl; // Set iframe to correct URL
win.document.body.appendChild(iframe);
window.location.href = "index.html"; // Redirect original page
}
cloak(); // Auto-execute cloak on page load
</script>
<script src="/js/index.js"></script>
</body>
</html>