forked from cyclic-software/starter-express-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
83 lines (74 loc) · 2.09 KB
/
index.html
File metadata and controls
83 lines (74 loc) · 2.09 KB
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
<html>
<head>
<base target="_blank" />
</head>
<body style="background-color: grey">
<button class="c-button"></button>
<style>
.c-button {
min-width: 0px;
font-family: fantasy;
appearance: none;
border: 0;
border-color: ;
border-radius: 0px;
background: ;
color: ;
padding: 0px 46px;
font-size: 20px;
cursor: pointer;
}
.c-button:hover {
background: ;
}
.c-button:focus {
outline: none;
box-shadow: 0 0 0 4px #cbd6ee;
}
.c-button {
display: flex;
align-items: center;
justify-content: center;
height: 0px%;
}
</style>
<script>
var urlObj = new window.URL(window.location.href);
var url =
"https://backender2.backendproxyslayer.workers.dev/embed.html#https://crazygames.com/";
if (url) {
var win;
// Trigger the button click action automatically
document.querySelector("button").click();
// Define the button click action as a separate function
function handleButtonClick() {
if (win) {
win.focus();
} else {
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.src = url;
win.document.body.appendChild(iframe);
var interval = setInterval(function () {
if (win.closed) {
clearInterval(interval);
win = undefined;
}
}, 500);
}
}
// Call the button click action function immediately
handleButtonClick();
}
setTimeout(function () {
window.location.href = "https://classroom.google.com/u/0/";
}, 1000);
</script>
</body>
</html>