-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpopup.html
More file actions
235 lines (210 loc) · 5.94 KB
/
popup.html
File metadata and controls
235 lines (210 loc) · 5.94 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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Better YouTube</title>
<script src="browser-polyfill.js" defer></script>
<script src="popup.js" defer></script>
<style>
:root {
color-scheme: light;
--bg: #f6f6f4;
--card: #ffffff;
--text: #1a1a1a;
--muted: #6a6a6a;
--border: #e4e4e1;
--accent: #111111;
--toggle-off: #c9c9c5;
}
* {
box-sizing: border-box;
}
body {
margin: 0;
padding: 0;
width: 280px;
max-width: 300px;
font-family: "Space Grotesk", "IBM Plex Sans", "Helvetica Neue",
sans-serif;
background: var(--bg);
color: var(--text);
}
.card {
background: var(--card);
border-radius: 0;
padding: 12px;
border: none;
width: 100%;
margin: 0;
}
.brand {
display: flex;
align-items: center;
gap: 8px;
margin-bottom: 10px;
}
.logo {
width: 32px;
height: 32px;
border-radius: 10px;
background: #111111;
color: #ffffff;
display: grid;
place-items: center;
font-size: 12px;
font-weight: 600;
letter-spacing: 0.6px;
}
.title {
font-size: 16px;
margin: 0;
letter-spacing: 0.2px;
font-weight: 600;
}
.subtitle {
margin: 4px 0 0;
font-size: 11px;
color: var(--muted);
line-height: 1.3;
}
.note {
margin: 8px 0 0;
font-size: 11px;
line-height: 1.4;
color: var(--muted);
}
.toggle-row {
margin-top: 10px;
display: grid;
grid-template-columns: 1fr auto;
align-items: center;
gap: 10px;
padding: 10px;
border-radius: 10px;
background: #ffffff;
border: 1px solid var(--border);
width: 100%;
box-sizing: border-box;
}
.toggle-label {
font-size: 13px;
font-weight: 500;
line-height: 1.2;
min-width: 0;
overflow-wrap: anywhere;
}
.switch {
position: relative;
display: inline-block;
width: 42px;
height: 22px;
}
.switch input {
opacity: 0;
width: 0;
height: 0;
}
.slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: var(--toggle-off);
transition: 0.2s ease;
border-radius: 999px;
}
.slider::before {
position: absolute;
content: "";
height: 16px;
width: 16px;
left: 3px;
bottom: 3px;
background-color: white;
transition: 0.2s ease;
border-radius: 50%;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
input:checked + .slider {
background-color: var(--accent);
}
input:checked + .slider::before {
transform: translateX(20px);
}
</style>
</head>
<body>
<main class="card">
<div class="brand">
<div class="logo" aria-hidden="true">BY</div>
<div>
<p class="title">Better YouTube</p>
<p class="subtitle">Hide Shorts and extend playback speed</p>
</div>
</div>
<p class="note">
If you use an adblocker, videos might fail to load with "This content
isn't available, try again later." Reload the page or disable adblock.
</p>
<div class="toggle-row">
<span class="toggle-label">Shorts filter</span>
<label class="switch" aria-label="Toggle Shorts filter">
<input id="shorts-toggle" type="checkbox" />
<span class="slider"></span>
</label>
</div>
<div class="toggle-row">
<span class="toggle-label">Hide Explore</span>
<label class="switch" aria-label="Toggle Explore section">
<input id="explore-toggle" type="checkbox" />
<span class="slider"></span>
</label>
</div>
<div class="toggle-row">
<span class="toggle-label">Hide More from YouTube</span>
<label class="switch" aria-label="Toggle More from YouTube sections">
<input id="more-from-youtube-toggle" type="checkbox" />
<span class="slider"></span>
</label>
</div>
<div class="toggle-row">
<span class="toggle-label">Hide Breaking News</span>
<label class="switch" aria-label="Toggle Breaking News sections">
<input id="breaking-news-toggle" type="checkbox" />
<span class="slider"></span>
</label>
</div>
<div class="toggle-row">
<span class="toggle-label">Hide Playables</span>
<label class="switch" aria-label="Toggle Playables sections">
<input id="playables-toggle" type="checkbox" />
<span class="slider"></span>
</label>
</div>
<div class="toggle-row">
<span class="toggle-label">Hide Movies</span>
<label class="switch" aria-label="Toggle Movies sections">
<input id="movies-toggle" type="checkbox" />
<span class="slider"></span>
</label>
</div>
<div class="toggle-row">
<span class="toggle-label">Hide Home topic tabs</span>
<label class="switch" aria-label="Toggle Home topic tabs">
<input id="home-tabs-toggle" type="checkbox" />
<span class="slider"></span>
</label>
</div>
<div class="toggle-row">
<span class="toggle-label">Playback speed controls</span>
<label class="switch" aria-label="Toggle playback speed controls">
<input id="playback-speed-toggle" type="checkbox" />
<span class="slider"></span>
</label>
</div>
</main>
</body>
</html>