-
Notifications
You must be signed in to change notification settings - Fork 1
/
abopener.html
89 lines (78 loc) · 2.91 KB
/
abopener.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>About:Blank Cloaker</title>
<style>
button {
padding: 10px 20px;
font-size: 18px;
margin-top: 10px;
cursor: pointer;
}
input {
padding: 10px;
font-size: 18px;
}
iframe {
width: 100%;
height: 100%;
border: none;
}
* {
background-color: black;
color: rgb(196, 196, 196);
font-family: monospace;
}
input,
button {
background-color: #131313;
border: #0a0a0a;
border-width: 3px;
border-radius: 3px;
border-style: solid;
margin: 1.4px;
cursor: pointer;
}
</style>
<link href="./prism.css" rel="stylesheet" />
</head>
<body>
<h2>About:Blank Cloaker</h2>
<p>Enter details below, and it will open in a new about:blank page (Be sure to copy the whole url with the https)</p>
<form id="cloakerForm">
<label for="cloakUrl">URL:</label>
<input type="url" id="cloakUrl" placeholder="Enter URL" required><br>
<label for="cloakTitle">Title:</label>
<input type="text" id="cloakTitle" placeholder="Enter title" required><br>
<label for="cloakFav">Favicon URL:</label>
<input type="url" id="cloakFav" placeholder="Enter favicon URL"><br>
<button type="button" onclick="openAboutBlank()">Open</button>
<button type="button" onclick="setGoogleDefaults()">Set Google Defaults</button>
<button type="button" onclick="setGdriveDefaults()">Set Google Drive Defaults</button>
</form>
<script>
function openAboutBlank() {
let win = window.open();
let frame = win.document.createElement("iframe");
frame.style = "height:100vh;width:100vw;position:absolute;top:0;left:0;border:none";
frame.src = document.querySelector("#cloakUrl").value;
win.document.body.append(frame);
win.document.title = document.querySelector("#cloakTitle").value;
let faviconUrl = document.querySelector('#cloakFav').value;
if (faviconUrl) {
win.document.head.innerHTML += `<link rel="icon" href="${faviconUrl}">`;
}
}
function setGoogleDefaults() {
document.querySelector('#cloakTitle').value = 'Google';
document.querySelector('#cloakFav').value = 'https://www.google.com/favicon.ico';
}
function setGdriveDefaults() {
document.querySelector('#cloakTitle').value = 'Google Drive';
document.querySelector('#cloakFav').value = 'https://ssl.gstatic.com/images/branding/product/1x/drive_2020q4_32dp.png';
}
</script>
</body>
</html>