-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsurffreely.html
132 lines (125 loc) · 3.89 KB
/
surffreely.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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
<!DOCTYPE html>
<html>
<head>
<script>let locbar = document.querySelector('.locbar');
locbar.style.position = 'fixed';
locbar.style.top = '0';
</script>
<div class="locbar" style="height: 70px !important; background-color: #000000; display: flex center top !important; justify-content: center; align-items: center; padding-left: 20px; padding-right: 20px;">
<a href="#" onclick="window.location.href='/bookmarklets.html'" style="padding: 20px 30px; margin-right: 10px;">Bookmarklets</a>
<a href="#" onclick="window.location.href='/settings.html'" style="padding: 20px 30px; margin-right: 10px;">Settings</a>
<a href="#" onclick="window.location.href='/requestgame.html'" style="padding: 20px 30px;">Game Request</a>
<a href="#" onclick="window.location.href='/surffreely.html'" style="padding: 20px 30px; margin-left: 10px;">Surf The Web</a>
<a href="#" onclick="window.location.href='/projects.html'" style="padding: 20px 30px; margin-left: 10px;">Home</a>
</div>
<link rel="shortcut icon" type="image/png" href="IMG/logo.png">
<link rel="icon" type="image/png" href="IMG/logo.png">
<meta charset="UTF-8">
<title>Surf Freely</title>
<style>
.locbar {align-items:top;
position: fixed !important;
top: 0 !important}
body {
display: flex;
flex-direction: column;
height: 100vh;
align-items: center;
justify-content: center;
margin: 0;
padding: 0;
background-color: #f2f2f2;
}
button {
background-color: #ffffff;
color: #000000;
border: none;
padding: 10px 20px;
margin: 10px;
cursor: pointer;
align-items: center;
justify-content: center;
font-size: 16px;
font-weight: bold;
text-align: center;
text-decoration: none;
display: inline-block;
transition-duration: 0.4s;
-webkit-transition-duration: 0.4s;
-moz-transition-duration: 0.4s;
border-radius: 10px;
}
button:hover {
background-color: #000000;
color: #ffffff;
}
iframe {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
border: none;
}
</style>
</head>
<body>
<script>
window.onload = function() {
var savedTheme = localStorage.getItem('theme');
if (savedTheme) {
document.body.style.backgroundColor = savedTheme;
var locbar = document.getElementsByClassName('locbar')[0];
if (locbar) {
locbar.style.backgroundColor = savedTheme;
}
}
if (window.location.href.indexOf("projects.html") > -1) {
var savedTheme = localStorage.getItem('theme');
if (savedTheme) {
document.body.style.backgroundColor = savedTheme;
var locbar = document.getElementsByClassName('locbar')[0];
if (locbar) {
locbar.style.backgroundColor = savedTheme;
}
}
}
}
function setTheme(color) {
localStorage.setItem('theme', color);
document.body.style.backgroundColor = color;
var locbar = document.getElementsByClassName('locbar')[0];
if (locbar) {
locbar.style.backgroundColor = color;
}
if (window.location.href.indexOf("projects.html") > -1) {
localStorage.setItem('theme', color);
document.body.style.backgroundColor = color;
var locbar = document.getElementsByClassName('locbar')[0];
if (locbar) {
locbar.style.backgroundColor = color;
}
}
}
</script>
<button>Press "~" to close the iFrames</button>
<button onclick="openIframe('https://sheilassunshades.site')">Nebula</button>
<button onclick="openIframe('https://bing.com')">Bing</button>
<button onclick="openIframe('https://cold-silly-coriander.glitch.me')">Chrome (slow)</button>
<script>
function openIframe(src) {
var iframe = document.createElement('iframe');
iframe.src = src;
document.body.appendChild(iframe);
}
document.addEventListener('keydown', function(event) {
if (event.key === '~') {
let iframes = document.querySelectorAll('iframe');
for (let i = 0; i < iframes.length; i++) {
iframes[i].parentNode.removeChild(iframes[i]);
}
}
});
</script>
</body>
</html>