-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathsettings.html
463 lines (402 loc) · 14.3 KB
/
settings.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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="DuckHTML Unblocked Games, Free to play">
<title>DuckHTML Settings</title>
<link rel="icon" type="image/x-icon" href="https://ucarecdn.com/cf91fdbc-e959-4737-9276-c5ddb93799a8/duckhtml.png">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=VT323&display=swap">
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-8X677NPBRV"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-8X677NPBRV');
</script>
<style>
#settingsContainer {
background-color: #1f1f1f;
padding: 20px;
border-radius: 15px;
width: 80%;
max-width: 800px; /* Limited maximum width */
box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
text-align: center;
}
.setting-item {
margin-bottom: 20px;
}
.input-container {
margin-bottom: 15px;
text-align: left;
}
label {
font-family: 'VT323', sans-serif;
font-size: 18px;
color: #f0f0f0;
display: block;
margin-bottom: 8px;
}
input[type="text"], select {
padding: 10px;
border: 2px solid #ffd700;
border-radius: 8px;
font-family: 'VT323', sans-serif;
font-size: 16px;
color: #363636;
width: calc(100% - 24px);
text-align: center;
background-color: #1f1f1f; /* Match theme background */
}
input[type="text"]:focus, select:focus {
outline: none;
border-color: #ffe44d;
}
.premade-favicons {
display: flex;
gap: 10px;
justify-content: center;
margin-top: 15px;
}
.premade-favicons span {
display: inline-block;
border-radius: 10px;
overflow: hidden;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
transition: transform 0.3s ease-in-out;
cursor: pointer;
}
.premade-favicons span:hover {
transform: scale(1.1);
}
.premade-favicons img {
display: block;
width: 40px;
height: 40px;
}
.action-button {
background-color: #ffd700;
color: #363636;
border: none;
border-radius: 8px;
padding: 10px 20px;
font-family: 'Press Start 2P', sans-serif;
font-size: 16px;
cursor: pointer;
transition: background-color 0.3s ease-in-out, transform 0.2s ease-in-out;
}
.action-button:hover {
background-color: #ffe44d;
transform: scale(1.05);
}
.action-button:focus {
outline: none;
}
h1 {
font-size: 48px;
color: white;
margin-top: 40px;
margin-bottom: 20px;
}
#colorSelectorContainer {
margin-top: 20px;
}
#colorSelect {
padding: 8px;
border: 2px solid #ffd700;
border-radius: 8px;
font-family: 'VT323', sans-serif;
font-size: 16px;
color: #363636;
background-color: #1f1f1f;
cursor: pointer;
}
#colorSelect:hover {
background-color: #2f2f2f;
}
body {
margin: 0;
font-family: 'VT323', sans-serif;
background-color: #121212;
color: #f0f0f0;
display: flex;
flex-direction: column;
align-items: center;
min-height: 100vh;
}
nav {
width: 100%;
position: fixed;
top: 0;
background-color: rgba(0, 0, 0, 0.5);
display: flex;
justify-content: space-between;
align-items: center;
padding: 10px 30px;
z-index: 1000;
}
nav .logo {
display: flex;
align-items: center;
}
nav .logo img {
height: 40px;
margin-right: 10px;
}
nav .logo span {
font-size: 24px;
color: white;
font-weight: bold;
}
nav a {
margin: 0 15px;
text-decoration: none;
color: white;
font-family: 'Press Start 2P', sans-serif;
font-weight: bold;
font-size: 16px;
transition: color 0.3s ease-in-out, border 0.3s ease-in-out;
border: 2px solid transparent;
border-radius: 8px;
padding: 8px 16px;
}
nav a:hover {
color: #ffd700;
border-color: white;
}
/* Ad container style */
/* Ad container style */
#adContainer {
width: 600px; /* Set a specific width for the popup */
height: auto; /* Allow height to adjust based on content */
position: fixed;
top: 20%; /* Position down from the top */
left: 50%;
transform: translateX(-50%);
background-color: #121212; /* Same background color as the ad */
display: none; /* Hide the ad container initially */
z-index: 1000; /* Ensure the ad is above other content */
border-radius: 10px; /* Rounded corners */
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5); /* Shadow for depth */
padding: 20px; /* Padding around the content */
text-align: center; /* Center text */
}
.closeButton {
position: absolute;
top: 5px;
right: 5px;
font-size: 24px;
color: #fff;
cursor: pointer;
width: 30px;
height: 30px;
background-color: #333;
border-radius: 5px;
display: flex;
justify-content: center;
align-items: center;
}
.adMessage {
color: #fff; /* White text color */
font-size: 18px; /* Font size */
margin: 10px 0; /* Margin around the message */
}
</style>
</head>
<body>
<nav>
<div class="logo">
<img src="https://ucarecdn.com/cf91fdbc-e959-4737-9276-c5ddb93799a8/duckhtml.png" alt="DuckHTML Logo">
<span>DuckHTML</span>
</div>
<div>
<a href="/index.html">Home</a>
<a href="/games.html">Games</a>
<a href="/settings.html">Settings</a>
<a href="/search.html">Search</a>
</div>
</nav>
<div id="settingsContainer">
<h1>Settings</h1>
<div class="setting-item">
<label for="pageTitle">Title:</label>
<input style="color: white;" type="text" id="pageTitle" placeholder="Enter new title">
</div>
<div class="setting-item">
<div class="input-container">
<label for="faviconUrl">Favicon URL:</label>
<input style="color: white;" type="text" id="faviconUrl" placeholder="Enter favicon URL">
</div>
<div class="premade-favicons">
<span onclick="selectFavicon('https://www.google.com/favicon.ico')">
<img src="https://www.google.com/favicon.ico" alt="Google Favicon">
</span>
<span onclick="selectFavicon('https://ssl.gstatic.com/docs/doclist/images/infinite_arrow_favicon_5.ico')">
<img src="https://ssl.gstatic.com/docs/doclist/images/infinite_arrow_favicon_5.ico" alt="Google Drive Favicon">
</span>
<span onclick="selectFavicon('https://assets.clever.com/resource-icons/apps/5148b6242e35482071000011/icon_964188f.png')">
<img src="https://assets.clever.com/resource-icons/apps/5148b6242e35482071000011/icon_964188f.png" alt="iReady Favicon">
</span>
<span onclick="selectFavicon('https://www.gstatic.com/classroom/ic_product_classroom_32.png')">
<img src="https://www.gstatic.com/classroom/ic_product_classroom_32.png" alt="Google Favicon">
</span>
<span onclick="selectFavicon('https://cdn-icons-png.flaticon.com/512/5968/5968517.png')">
<img src="https://cdn-icons-png.flaticon.com/512/5968/5968517.png" alt="Google Favicon">
</span>
<span onclick="selectFavicon('https://www.clever.com/wp-content/uploads/2023/06/cropped-Favicon-512px-192x192.png')">
<img src="https://www.clever.com/wp-content/uploads/2023/06/cropped-Favicon-512px-192x192.png" alt="Google Favicon">
</span>
</div>
</div>
<div class="setting-item">
<h2>Theme:</h2>
<div style="color: white;" id="colorSelectorContainer">
<select id="colorSelect" onchange="changeBackgroundColor()">
<option style="color: white;" value="default">Default</option>
<option style="color: white;" value="white">White</option>
<option style="color: white;" value="ocean">Ocean</option>
<option style="color: white;" value="leaf">Leaf</option>
<option style="color: white;" value="beach">Beach</option>
</select>
</div>
</div>
<div class="setting-item">
<h2>Panic Key</h2>
<p>A panic key is a key you click when somebody is around. Once clicked it redirects you to a different website of your choosing.</p>
<div class="input-container">
<label style="color: white;" for="panicKey">Panic Key:</label>
<input style="color: white;" type="text" id="panicKey" placeholder="Enter panic key">
</div>
<div class="input-container">
<label for="panicUrl">Redirect URL:</label>
<input type="text" id="panicUrl" style="color: white;" placeholder="Enter URL to redirect">
</div>
</div>
<button class="action-button" onclick="applyChanges()">Apply Changes</button>
</div>
<script type='text/javascript' src='//pl24530633.profitablecpmrate.com/8a/26/04/8a2604b7dc51db332008ddf67973775b.js'></script>
<script>
// Function to apply changes to title, favicon, and theme
function applyChanges() {
var newTitle = document.getElementById('pageTitle').value;
var newFavicon = document.getElementById('faviconUrl').value;
var selectedTheme = document.getElementById('colorSelect').value;
var panicKey = document.getElementById('panicKey').value.toLowerCase();
var panicUrl = document.getElementById('panicUrl').value;
localStorage.setItem('pageTitle', newTitle);
localStorage.setItem('faviconUrl', newFavicon);
localStorage.setItem('panicKey', panicKey); // Store panic key
localStorage.setItem('panicUrl', panicUrl); // Store panic URL
document.title = newTitle;
updateFavicon(newFavicon);
applyTheme(selectedTheme);
}
// Function to set up panic key functionality
function setupPanicKey() {
var panicKey = localStorage.getItem('panicKey') || '';
var panicUrl = localStorage.getItem('panicUrl') || '';
document.addEventListener('keydown', function(event) {
if (event.key === panicKey) {
window.location.href = panicUrl;
}
});
}
// Run setup functions on page load
window.onload = function() {
var savedTitle = localStorage.getItem('pageTitle') || 'DuckHTML';
var savedFavicon = localStorage.getItem('faviconUrl') || 'https://ucarecdn.com/cf91fdbc-e959-4737-9276-c5ddb93799a8/duckhtml.png';
var savedTheme = localStorage.getItem('theme') || 'default';
document.getElementById('pageTitle').value = savedTitle;
document.getElementById('faviconUrl').value = savedFavicon;
document.title = savedTitle;
updateFavicon(savedFavicon);
applyTheme(savedTheme);
// Setup panic key event listener
setupPanicKey();
};
// Function to update favicon
function updateFavicon(faviconUrl) {
var link = document.querySelector("link[rel~='icon']") || document.createElement('link');
link.type = 'image/x-icon';
link.rel = 'icon';
link.href = faviconUrl;
document.head.appendChild(link);
}
// Function to apply theme based on selected option
function applyTheme(theme) {
var body = document.body;
var nav = document.querySelector('nav');
var buttons = document.querySelectorAll('nav a');
switch (theme) {
case 'default':
setThemeStyles('#121212', 'rgba(0, 0, 0, 0.5)', '#ffffff', 'transparent'); // Change border color to transparent
break;
case 'white':
setThemeStyles('#ffffff', 'rgba(0, 0, 0, 0.5)', '#ffffff', 'transparent');
break;
case 'ocean':
setThemeStyles('#ADD8E6', '#D5FFFF', '#0000ff', 'transparent');
break;
case 'leaf':
setThemeStyles('#90EE90', '#013220', '#00ff00', 'transparent');
break;
case 'beach':
setThemeStyles('#BC8F8F', '#556B2F', '#D2B48C', 'transparent');
break;
default:
setThemeStyles('#121212', 'rgba(0, 0, 0, 0.5)', '#ffd700', 'transparent');
break;
}
localStorage.setItem('theme', theme);
}
// Function to update styles for body, nav, and buttons based on theme
function setThemeStyles(bodyColor, navColor, buttonTextColor, buttonBorderColor) {
var body = document.body;
var nav = document.querySelector('nav');
var buttons = document.querySelectorAll('nav a');
body.style.backgroundColor = bodyColor;
nav.style.backgroundColor = navColor;
buttons.forEach(function(button) {
button.style.color = buttonTextColor;
button.style.borderColor = buttonBorderColor; // Set border color separately
});
}
// Function to handle change in background color theme
function changeBackgroundColor() {
var selectedTheme = document.getElementById('colorSelect').value;
applyTheme(selectedTheme);
}
// Function to handle favicon selection
function selectFavicon(url) {
document.getElementById('faviconUrl').value = url;
updateFavicon(url);
}
// Function to set up panic key functionality
function setupPanicKey() {
document.addEventListener('keydown', function(event) {
var panicKey = document.getElementById('panicKey').value.toLowerCase();
var panicUrl = document.getElementById('panicUrl').value;
if (event.key === panicKey) {
window.location.href = panicUrl;
}
});
}
// Run setup functions on page load
window.onload = function() {
var savedTitle = localStorage.getItem('pageTitle') || 'DuckHTML';
var savedFavicon = localStorage.getItem('faviconUrl') || 'https://ucarecdn.com/cf91fdbc-e959-4737-9276-c5ddb93799a8/duckhtml.png';
var savedTheme = localStorage.getItem('theme') || 'default';
document.getElementById('pageTitle').value = savedTitle;
document.getElementById('faviconUrl').value = savedFavicon;
document.title = savedTitle;
updateFavicon(savedFavicon);
applyTheme(savedTheme);
// Setup panic key event listener
setupPanicKey();
};
</script>
</body>
</html>