-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
495 lines (441 loc) · 28.5 KB
/
Copy pathindex.html
File metadata and controls
495 lines (441 loc) · 28.5 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
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
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>vantablack</title>
<link rel="icon" type="image/x-icon" href="assets/favicon.ico">
<style>
@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&family=Syne:wght@300;400;700;800&display=swap');
:root {
--bg: #080808; --bg2: #0f0f0f; --bg3: #161616;
--border: #222222; --border-bright: #333;
--text: #c8c8c8; --text-dim: #555; --text-bright: #e8e8e8;
--accent: #e63946; --accent2: #ff6b6b;
--font-display: 'Syne', sans-serif; --font-mono: 'Space Mono', monospace;
--glow: 0 0 20px rgba(230,57,70,0.15);
--transition: cubic-bezier(0.23, 1, 0.32, 1);
}
[data-theme="red"] { --accent: #e63946; --accent2: #ff6b6b; }
[data-theme="cyan"] { --accent: #00d4ff; --accent2: #7fffff; }
[data-theme="mono"] { --accent: #aaaaaa; --accent2: #cccccc; }
[data-theme="green"] { --accent: #39e67a; --accent2: #6bffaa; }
[data-theme="purple"] { --accent: #a855f7; --accent2: #c084fc; }
[data-theme="orange"] { --accent: #f97316; --accent2: #fb923c; }
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; background: var(--bg); color: var(--text); font-family: var(--font-mono); overflow-x: hidden; }
/* Overlays */
.noise {
position: fixed; inset: 0; pointer-events: none; z-index: 9999; opacity: 0.025;
background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
background-repeat: repeat; background-size: 200px 200px; transition: opacity 0.4s;
}
.noise.hidden-overlay { opacity: 0 !important; }
.scanlines {
position: fixed; inset: 0; pointer-events: none; z-index: 9998;
background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,0.03) 2px, rgba(0,0,0,0.03) 4px);
transition: opacity 0.4s;
}
.scanlines.hidden-overlay { opacity: 0 !important; }
/* Topbar */
.topbar {
position: fixed; top: 0; left: 0; right: 0; height: 52px;
display: flex; align-items: center; justify-content: space-between;
padding: 0 32px;
background: rgba(8,8,8,0.85); backdrop-filter: blur(12px);
border-bottom: 1px solid var(--border); z-index: 100;
animation: slideDown 0.6s var(--transition) both;
}
@keyframes slideDown { from { transform: translateY(-100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.logo { font-family: var(--font-display); font-weight: 800; font-size: 1rem; letter-spacing: 0.1em; color: var(--text-bright); text-decoration: none; }
.logo .accent { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 20px; }
.nav-link {
font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.15em;
color: var(--text-dim); text-decoration: none; text-transform: lowercase;
transition: color 0.2s; cursor: pointer; background: none; border: none; padding: 0;
}
.nav-link:hover, .nav-link.active { color: var(--text-bright); }
/* Dropdown */
.nav-dropdown { position: relative; }
.dropdown-toggle {
font-size: 0.7rem; letter-spacing: 0.15em; color: var(--text-dim);
background: none; border: none; cursor: pointer;
font-family: var(--font-mono); padding: 0; transition: color 0.2s; text-transform: lowercase;
}
.dropdown-toggle:hover, .dropdown-toggle.active { color: var(--text-bright); }
.dropdown-menu {
display: none; position: absolute; top: calc(100% + 10px); right: 0;
background: var(--bg2); border: 1px solid var(--border); border-radius: 4px;
min-width: 140px; overflow: hidden; z-index: 300;
}
.dropdown-menu.open { display: block; animation: dropIn 0.15s var(--transition); }
.dropdown-item {
display: block; padding: 9px 16px; font-size: 0.68rem;
letter-spacing: 0.1em; color: var(--text-dim); text-decoration: none;
text-transform: lowercase; transition: background 0.15s, color 0.15s;
}
.dropdown-item:hover, .dropdown-item.active { background: var(--bg3); color: var(--text-bright); }
@keyframes dropIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
/* Hero */
.hero {
min-height: 100vh; display: flex; flex-direction: column;
align-items: center; justify-content: center; gap: 40px; padding: 80px 20px 40px;
}
/* Title */
.title-block { text-align: center; animation: fadeUp 0.8s 0.2s var(--transition) both; }
@keyframes fadeUp { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.no-anim .title-block, .no-anim .search-container, .no-anim .shortcut-grid, .no-anim .topbar, .no-anim .t-char { animation: none !important; }
.site-title {
font-family: var(--font-display); font-size: clamp(2.5rem, 8vw, 5.5rem);
font-weight: 800; letter-spacing: 0.1em; color: var(--text-bright);
display: flex; gap: 0.02em; user-select: none;
}
.t-char { display: inline-block; animation: charIn 0.6s calc(var(--i) * 0.05s + 0.3s) var(--transition) both; }
@keyframes charIn { from { opacity: 0; transform: translateY(10px) scale(0.9); } to { opacity: 1; transform: translateY(0) scale(1); } }
.t-char.accent-dot { color: var(--accent); opacity: 1 !important; }
.t-char.t-vanta { color: var(--text-bright); }
.t-char.t-black { color: var(--accent); }
.subtitle { margin-top: 16px; font-size: 0.82rem; letter-spacing: 0.35em; color: rgba(200,200,200,0.45); text-transform: uppercase; animation: fadeUp 0.8s 0.7s var(--transition) both; }
/* Search */
.search-container { position: relative; width: 100%; max-width: 580px; animation: fadeUp 0.8s 0.4s var(--transition) both; }
.search-box {
display: flex; align-items: center; background: var(--bg2);
border: 1px solid var(--border); border-radius: 4px; padding: 0 16px; height: 52px; gap: 12px;
transition: border-color 0.2s, box-shadow 0.2s;
}
.search-box:focus-within { border-color: var(--border-bright); box-shadow: var(--glow); }
.search-icon { color: var(--text-dim); font-size: 1rem; flex-shrink: 0; transition: color 0.2s, transform 0.2s; }
.search-box:focus-within .search-icon { color: var(--accent); transform: translateX(3px); }
.search-input { flex: 1; background: transparent; border: none; outline: none; color: var(--text-bright); font-family: var(--font-mono); font-size: 0.85rem; letter-spacing: 0.03em; }
.search-input::placeholder { color: var(--text-dim); }
/* Shortcuts */
.shortcut-grid { display: flex; gap: 28px; flex-wrap: wrap; justify-content: center; animation: fadeUp 0.8s 0.6s var(--transition) both; }
.shortcut { display: flex; flex-direction: column; align-items: center; gap: 8px; text-decoration: none; cursor: pointer; transition: transform 0.25s var(--transition); }
.shortcut:hover { transform: translateY(-4px); }
.shortcut-icon { width: 44px; height: 44px; background: var(--bg2); border: 1px solid var(--border); border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 1rem; color: var(--text-dim); transition: border-color 0.2s, color 0.2s, box-shadow 0.2s; }
.shortcut:hover .shortcut-icon { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 14px rgba(230,57,70,0.2); }
.shortcut span { font-size: 0.6rem; letter-spacing: 0.12em; color: var(--text-dim); text-transform: lowercase; }
/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.75); backdrop-filter: blur(6px); z-index: 200; display: flex; align-items: center; justify-content: center; animation: overlayIn 0.2s ease; }
@keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }
.modal-overlay.hidden { display: none; }
.modal { background: var(--bg2); border: 1px solid var(--border); border-radius: 6px; width: 90%; max-width: 460px; max-height: 85vh; overflow-y: auto; animation: modalIn 0.3s var(--transition); scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
@keyframes modalIn { from { transform: scale(0.94) translateY(10px); opacity: 0; } to { transform: scale(1) translateY(0); opacity: 1; } }
.modal-header { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--bg2); z-index: 1; }
.modal-icon { color: var(--accent); font-size: 0.9rem; }
.modal-header h2 { font-family: var(--font-mono); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.2em; color: var(--text-bright); flex: 1; }
.modal-close { background: none; border: none; color: var(--text-dim); font-size: 0.8rem; cursor: pointer; transition: color 0.2s; padding: 4px; }
.modal-close:hover { color: var(--accent); }
.modal-section { padding: 18px 20px; border-bottom: 1px solid var(--border); }
.modal-section--last { border-bottom: none; }
.section-label { font-size: 0.58rem; letter-spacing: 0.28em; color: var(--text-dim); text-transform: uppercase; margin-bottom: 14px; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,0.03); }
.setting-row:last-child { border-bottom: none; }
.setting-row.cloak-sub { padding-left: 12px; border-left: 2px solid var(--border); margin-left: 4px; }
.setting-info { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.setting-name { font-size: 0.78rem; color: var(--text-bright); letter-spacing: 0.02em; }
.setting-desc { font-size: 0.62rem; color: var(--text-dim); letter-spacing: 0.03em; }
.setting-select { background: var(--bg3); border: 1px solid var(--border); border-radius: 3px; color: var(--text); font-family: var(--font-mono); font-size: 0.68rem; padding: 5px 8px; cursor: pointer; outline: none; transition: border-color 0.2s; flex-shrink: 0; min-width: 120px; }
.setting-select:focus { border-color: var(--border-bright); }
.toggle-switch { position: relative; width: 42px; height: 22px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; inset: 0; background: var(--bg3); border: 1px solid var(--border); border-radius: 22px; cursor: pointer; transition: background 0.2s, border-color 0.2s; }
.slider::before { content: ''; position: absolute; left: 3px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; border-radius: 50%; background: var(--text-dim); transition: transform 0.2s, background 0.2s; }
.toggle-switch input:checked + .slider { background: rgba(230,57,70,0.2); border-color: var(--accent); }
.toggle-switch input:checked + .slider::before { transform: translateX(20px) translateY(-50%); background: var(--accent); }
.about-row { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.about-name { font-family: var(--font-display); font-size: 1rem; font-weight: 700; color: var(--text-bright); letter-spacing: 0.05em; }
.about-ver { font-size: 0.6rem; color: var(--text-dim); letter-spacing: 0.15em; background: var(--bg3); border: 1px solid var(--border); border-radius: 3px; padding: 2px 6px; }
.about-desc { font-size: 0.62rem; color: var(--text-dim); letter-spacing: 0.1em; margin-bottom: 14px; }
.reset-btn { background: none; border: 1px solid var(--border); border-radius: 3px; color: var(--text-dim); font-family: var(--font-mono); font-size: 0.65rem; letter-spacing: 0.1em; padding: 7px 14px; cursor: pointer; transition: border-color 0.2s, color 0.2s; }
.reset-btn:hover { border-color: var(--accent); color: var(--accent); }
.credit-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.04); }
.credit-row:last-child { border-bottom: none; }
.credit-info { display: flex; flex-direction: column; gap: 3px; }
.credit-name { font-size: 0.78rem; color: var(--text-bright); letter-spacing: 0.02em; }
.credit-role { font-size: 0.6rem; letter-spacing: 0.12em; color: var(--text-dim); text-transform: uppercase; }
.credit-link { color: var(--text-dim); text-decoration: none; font-size: 0.9rem; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: 3px; background: var(--bg3); transition: all 0.15s; flex-shrink: 0; }
.credit-link:hover { color: var(--accent); border-color: var(--accent); background: rgba(230,57,70,0.06); }
::-webkit-scrollbar { width: 4px; } ::-webkit-scrollbar-track { background: var(--bg); } ::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.hidden { display: none !important; }
/* ── Custom cursor ───────────────────────────────────────── */
*, *::before, *::after { cursor: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><path fill="%23F85050" stroke="%23000000" stroke-width="2" d="M5.5 3.21V20.8c0 .45.54.67.85.35l4.86-4.86a.5.5 0 0 1 .35-.15h6.87a.5.5 0 0 0 .35-.85L6.35 2.85a.5.5 0 0 0-.85.35Z"></path></svg>') 0 0, auto !important; }
</style>
</head>
<body>
<div class="noise"></div>
<div class="scanlines"></div>
<nav class="topbar">
<a href="index.html" class="logo">vanta<span class="accent">black</span></a>
<div class="nav-links">
<a href="index.html" class="nav-link active">home</a>
<a href="games.html" class="nav-link">g@m3s</a>
<a href="music.html" class="nav-link">music</a>
<a href="search.html" class="nav-link">pr*xy</a>
<a href="ai.html" class="nav-link">AI</a>
<a href="#" class="nav-link" id="settingsBtn">settings</a>
<div class="nav-dropdown">
<button class="dropdown-toggle" id="moreBtn">more ▾</button>
<div class="dropdown-menu" id="dropdownMenu">
<a href="about.html" class="dropdown-item">about</a>
<a href="changelog.html" class="dropdown-item">changelog</a>
<a href="themes.html" class="dropdown-item">themes</a>
<a href="bookmarks.html" class="dropdown-item">bookmarks</a>
<a href="partners.html" class="dropdown-item">partners</a>
</div>
</div>
</div>
</nav>
<main class="hero">
<div class="title-block">
<h1 class="site-title">
<span class="t-char t-vanta" style="--i:0">v</span><span class="t-char t-vanta" style="--i:1">a</span><span class="t-char t-vanta" style="--i:2">n</span><span class="t-char t-vanta" style="--i:3">t</span><span class="t-char t-vanta" style="--i:4">a</span><span class="t-char accent-dot" style="--i:5">·</span><span class="t-char t-black" style="--i:6">b</span><span class="t-char t-black" style="--i:7">l</span><span class="t-char t-black" style="--i:8">a</span><span class="t-char t-black" style="--i:9">c</span><span class="t-char t-black" style="--i:10">k</span>
</h1>
<p class="subtitle">unr3$tr!ct3d. untraceable. absolute.</p>
</div>
<div class="search-container">
<div class="search-box">
<span class="search-icon">→</span>
<input type="text" id="searchInput" class="search-input" placeholder="search or enter a URL..." autocomplete="off" spellcheck="false" />
</div>
</div>
<div class="shortcut-grid">
<a href="https://youtube.com" class="shortcut" data-proxy="true"><div class="shortcut-icon">▶</div><span>youtube</span></a>
<a href="https://github.com" class="shortcut" data-proxy="true"><div class="shortcut-icon">◈</div><span>github</span></a>
<a href="https://discord.com" class="shortcut" data-proxy="true"><div class="shortcut-icon">◉</div><span>discord</span></a>
<a href="https://reddit.com" class="shortcut" data-proxy="true"><div class="shortcut-icon">◎</div><span>reddit</span></a>
<a href="https://x.com" class="shortcut" data-proxy="true"><div class="shortcut-icon">✕</div><span>twitter</span></a>
<a href="https://instagram.com" class="shortcut" data-proxy="true"><div class="shortcut-icon">◷</div><span>instagram</span></a>
</div>
</main>
<!-- Settings Modal -->
<div class="modal-overlay hidden" id="settingsOverlay">
<div class="modal">
<div class="modal-header"><span class="modal-icon">⚙</span><h2>SETTINGS</h2><button class="modal-close" id="closeSettings">✕</button></div>
<div class="modal-section">
<div class="section-label">◈ APPEARANCE</div>
<div class="setting-row"><div class="setting-info"><span class="setting-name">Theme</span><span class="setting-desc">Color scheme for the interface</span></div><select class="setting-select" id="themeSelect"><option value="dark">Dark</option><option value="cyan">Cyan Neon</option><option value="purple">Ultraviolet</option><option value="green">Phosphor</option><option value="orange">Ember</option><option value="mono">Monochrome</option></select></div>
<div class="setting-row"><div class="setting-info"><span class="setting-name">Noise Overlay</span><span class="setting-desc">Film grain texture on background</span></div><label class="toggle-switch"><input type="checkbox" id="noiseToggle" checked /><span class="slider"></span></label></div>
<div class="setting-row"><div class="setting-info"><span class="setting-name">Scanlines</span><span class="setting-desc">CRT scanline effect</span></div><label class="toggle-switch"><input type="checkbox" id="scanlinesToggle" checked /><span class="slider"></span></label></div>
<div class="setting-row"><div class="setting-info"><span class="setting-name">Animations</span><span class="setting-desc">Enable page transition animations</span></div><label class="toggle-switch"><input type="checkbox" id="animationsToggle" checked /><span class="slider"></span></label></div>
</div>
<div class="modal-section">
<div class="section-label">◎ BROWSING</div>
<div class="setting-row"><div class="setting-info"><span class="setting-name">Open in New Tab</span><span class="setting-desc">Launch pr*xy in a new browser tab</span></div><label class="toggle-switch"><input type="checkbox" id="newTabToggle" /><span class="slider"></span></label></div>
</div>
<div class="modal-section">
<div class="section-label">⚡ PRIVACY</div>
<div class="setting-row"><div class="setting-info"><span class="setting-name">Tab Cloaking</span><span class="setting-desc">Disguise tab title and favicon</span></div><label class="toggle-switch"><input type="checkbox" id="cloakToggle" /><span class="slider"></span></label></div>
<div class="setting-row cloak-sub hidden" id="cloakSub"><div class="setting-info"><span class="setting-name">Cloak As</span><span class="setting-desc">What the tab will appear as</span></div><select class="setting-select" id="cloakSelect"><option value="google">Google</option><option value="drive">Google Drive</option><option value="classroom">Google Classroom</option><option value="outlook">Outlook</option><option value="docs">Google Docs</option></select></div>
<div class="setting-row"><div class="setting-info"><span class="setting-name">Clear on Close</span><span class="setting-desc">Wipe pr*xy history when tab closes</span></div><label class="toggle-switch"><input type="checkbox" id="clearOnCloseToggle" /><span class="slider"></span></label></div>
</div>
<div class="modal-section">
<div class="section-label">◷ ABOUT</div>
<div class="about-row"><span class="about-name">vantablack</span><span class="about-ver">v1.0.0</span></div>
<div class="about-desc">unr3$tr!ct3d. untraceable. absolute.</div>
<button class="reset-btn" id="resetBtn">↺ Reset all settings</button>
</div>
<div class="modal-section modal-section--last">
<div class="section-label">✦ CREDITS</div>
<div class="credit-row"><div class="credit-info"><span class="credit-name">3kh0</span><span class="credit-role">g@m3s library</span></div><a href="https://3kh0.github.io" target="_blank" class="credit-link">↗</a></div>
<div class="credit-row"><div class="credit-info"><span class="credit-name">Ultimate Game Stash</span><span class="credit-role">extra g@m3s</span></div><a href="https://docs.google.com/document/d/1_FmH3BlSBQI7FGgAQL59-ZPe8eCxs35wel6JUyVaG8Q/" target="_blank" class="credit-link">↗</a></div>
<div class="credit-row"><div class="credit-info"><span class="credit-name">Titanium Network — Ultraviolet</span><span class="credit-role">pr*xy infrastructure</span></div><a href="https://github.com/titaniumnetwork-dev/Ultraviolet" target="_blank" class="credit-link">↗</a></div>
</div>
</div>
</div>
<script>
// ─── VantaSettings ────────────────────────────────────────────────────────────
// Shared settings module used by both index.html and search.html
const VantaSettings = (() => {
const KEY = 'vanta_settings';
const DEFAULTS = {
theme: 'dark',
noise: true,
scanlines: true,
animations: true,
searchEngine: 'ddg',
newTab: false,
cloak: false,
cloakAs: 'google',
clearOnClose: false,
};
const CLOAK_PRESETS = {
google: { title: 'Google', favicon: 'https://www.google.com/favicon.ico' },
drive: { title: 'Google Drive', favicon: 'https://ssl.gstatic.com/images/branding/product/1x/drive_2020q4_32dp.png' },
classroom: { title: 'Google Classroom',favicon: 'https://ssl.gstatic.com/classroom/favicon.png' },
outlook: { title: 'Outlook', favicon: 'https://res.cdn.office.net/assets/mail/pwa/v1/pngs/favicon.png' },
docs: { title: 'Google Docs', favicon: 'https://ssl.gstatic.com/docs/documents/images/kix-favicon7.ico' },
};
function load() {
try {
const raw = localStorage.getItem(KEY);
return raw ? { ...DEFAULTS, ...JSON.parse(raw) } : { ...DEFAULTS };
} catch {
return { ...DEFAULTS };
}
}
function save(data) {
try {
localStorage.setItem(KEY, JSON.stringify(data));
} catch (e) {
console.warn('[vantablack] Could not save settings:', e);
}
}
function reset() {
try { localStorage.removeItem(KEY); } catch {}
return { ...DEFAULTS };
}
// Apply all visual settings to the current page
function apply(s) {
s = s || load();
// Theme
document.documentElement.setAttribute('data-theme', s.theme || 'dark');
// Noise
const noise = document.querySelector('.noise');
if (noise) noise.classList.toggle('hidden-overlay', !s.noise);
// Scanlines
const sl = document.querySelector('.scanlines');
if (sl) sl.classList.toggle('hidden-overlay', !s.scanlines);
// Animations
document.body.classList.toggle('no-anim', !s.animations);
// Tab cloaking
if (s.cloak && CLOAK_PRESETS[s.cloakAs]) {
const preset = CLOAK_PRESETS[s.cloakAs];
document.title = preset.title;
setFavicon(preset.favicon);
}
// Clear on close
if (s.clearOnClose) {
window.addEventListener('beforeunload', () => {
try { sessionStorage.clear(); } catch {}
});
}
}
function setFavicon(url) {
let link = document.querySelector("link[rel~='icon']");
if (!link) {
link = document.createElement('link');
link.rel = 'icon';
document.head.appendChild(link);
}
link.href = url;
}
function getEngine() {
const engines = {
ddg: 'https://html.duckduckgo.com/html/?q=',
google: 'https://www.google.com/search?q=',
bing: 'https://www.bing.com/search?q=',
brave: 'https://search.brave.com/search?q=',
};
return engines[load().searchEngine] || engines.ddg;
}
return { load, save, reset, apply, getEngine, DEFAULTS, CLOAK_PRESETS };
})();
// Auto-apply on load
document.addEventListener('DOMContentLoaded', () => VantaSettings.apply());
</script>
<script>
(function () {
const searchInput = document.getElementById('searchInput');
const settingsBtn = document.getElementById('settingsBtn');
const closeSettings = document.getElementById('closeSettings');
const settingsOverlay = document.getElementById('settingsOverlay');
const themeSelect = document.getElementById('themeSelect');
const noiseToggle = document.getElementById('noiseToggle');
const scanlinesToggle = document.getElementById('scanlinesToggle');
const animationsToggle= document.getElementById('animationsToggle');
const newTabToggle = document.getElementById('newTabToggle');
const cloakToggle = document.getElementById('cloakToggle');
const cloakSub = document.getElementById('cloakSub');
const cloakSelect = document.getElementById('cloakSelect');
const clearOnCloseToggle = document.getElementById('clearOnCloseToggle');
const resetBtn = document.getElementById('resetBtn');
const DDG = 'https://search.brave.com/search?q=';
// ── Navigate ─────────────────────────────────────────────────────────────────
function navigate(input) {
input = (input || '').trim();
if (!input) return;
let targetUrl;
const looksLikeUrl = /^(https?:\/\/)|^([a-zA-Z0-9-]+\.[a-zA-Z]{2,}(\/|$))/.test(input);
if (looksLikeUrl) {
targetUrl = input.includes('://') ? input : 'https://' + input;
try { new URL(targetUrl); } catch { targetUrl = DDG + encodeURIComponent(input); }
} else {
targetUrl = DDG + encodeURIComponent(input);
}
sessionStorage.setItem('vanta_target', targetUrl);
if (VantaSettings.load().newTab) {
window.open('search.html', '_blank');
} else {
window.location.href = 'search.html';
}
}
searchInput.addEventListener('keydown', e => { if (e.key === 'Enter') navigate(searchInput.value); });
// Shortcuts — all go through proxy
document.querySelectorAll('.shortcut[data-proxy="true"]').forEach(link => {
link.addEventListener('click', e => {
e.preventDefault();
sessionStorage.setItem('vanta_target', link.href);
if (VantaSettings.load().newTab) window.open('search.html', '_blank');
else window.location.href = 'search.html';
});
});
// ── Settings modal ───────────────────────────────────────────────────────────
function populateSettings() {
const st = VantaSettings.load();
themeSelect.value = st.theme;
noiseToggle.checked = st.noise;
scanlinesToggle.checked = st.scanlines;
animationsToggle.checked = st.animations;
newTabToggle.checked = st.newTab;
cloakToggle.checked = st.cloak;
cloakSelect.value = st.cloakAs;
clearOnCloseToggle.checked = st.clearOnClose;
cloakSub.classList.toggle('hidden', !st.cloak);
}
function saveSetting(key, value) {
const st = VantaSettings.load();
st[key] = value;
VantaSettings.save(st);
VantaSettings.apply(st);
}
settingsBtn.addEventListener('click', e => {
e.preventDefault();
populateSettings();
settingsOverlay.classList.remove('hidden');
});
closeSettings.addEventListener('click', () => settingsOverlay.classList.add('hidden'));
settingsOverlay.addEventListener('click', e => {
if (e.target === settingsOverlay) settingsOverlay.classList.add('hidden');
});
themeSelect.addEventListener('change', () => saveSetting('theme', themeSelect.value));
noiseToggle.addEventListener('change', () => saveSetting('noise', noiseToggle.checked));
scanlinesToggle.addEventListener('change', () => saveSetting('scanlines', scanlinesToggle.checked));
animationsToggle.addEventListener('change', () => saveSetting('animations', animationsToggle.checked));
newTabToggle.addEventListener('change', () => saveSetting('newTab', newTabToggle.checked));
clearOnCloseToggle.addEventListener('change', () => saveSetting('clearOnClose', clearOnCloseToggle.checked));
cloakToggle.addEventListener('change', () => {
saveSetting('cloak', cloakToggle.checked);
cloakSub.classList.toggle('hidden', !cloakToggle.checked);
});
cloakSelect.addEventListener('change', () => saveSetting('cloakAs', cloakSelect.value));
resetBtn.addEventListener('click', () => {
if (confirm('Reset all settings to defaults?')) {
VantaSettings.reset();
VantaSettings.apply();
populateSettings();
}
});
})();
</script>
<script>
const _mBtn = document.getElementById('moreBtn');
const _mMenu = document.getElementById('dropdownMenu');
if (_mBtn && _mMenu) {
_mBtn.addEventListener('click', e => { e.stopPropagation(); _mMenu.classList.toggle('open'); });
document.addEventListener('click', () => _mMenu.classList.remove('open'));
}
</script>
</body>
</html>