-
Notifications
You must be signed in to change notification settings - Fork 0
/
YouTubeLessAddictive.user.css
346 lines (280 loc) · 9.96 KB
/
YouTubeLessAddictive.user.css
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
/* ==UserStyle==
@name YouTube | LessAddictive | by Cubiq
@namespace github.com/TheCubiq/stylus
@version 1.0.0
@description Search for what you actually want to search for <3
@author CubiqTheCreator
@preprocessor stylus
@var checkbox mic-disabled "disable voice input" 0
==/UserStyle== */
@-moz-document url("https://www.youtube.com/"),
url("https://www.youtube.com/?app=desktop") {
/*
This code is actually pretty terrible, positioning to -50vh and all the other masterpieces..
You are currently looking at code from the year 2018, slightly modified over the years
Anything that's written there is straight up garbage so don't judge me on this one
I've improved over the years I swear 💀
*/
accent-color=rgb(255, 0, 0);
// remove unwanted crap we don't need to be shown
tp-yt-app-drawer#guide,
/* ytd-mini-guide-renderer.style-scope.ytd-app, */
ytd-page-manager#page-manager {
display: none !important;
}
//
// left search icon animation
//
div#container {
transition: all 0.3s 0.05s ease-in-out;
}
#search-icon.ytd-searchbox {
display: inline-flex;
opacity: 0;
width: 20px;
height: 20px;
transition: all 0.3s ease-in-out;
}
ytd-searchbox[has-focus] #search-icon.ytd-searchbox {
opacity: 1;
}
//
// over-all positioning
//
#masthead-container.ytd-app {
top: unset !important;
top: 50vh !important;
/* bottom: 50vh !important; */
z-index: 9999 !important;
animation: whaspopin 1s 0.5s backwards;
}
div#background {
background: transparent !important;
}
div#end,
div#start {
transform: translateY(-50vh);
}
div#center {
transform: translateY(-50%) scale(1.5);
}
tp-yt-iron-dropdown.style-scope.ytd-popup-container {
z-index: 99999999 !important;
}
body {
overflow-y: hidden !important;
}
//
// Voice search button
//
#voice-search-button {
transition: all .3s;
max-width: 40px;
if (mic-disabled) {
max-width: 0px;
opacity: 0;
}
}
//
// search results
//
// result text
.gsfs {
font-size: 1.6rem;
color: #ffffffb8;
}
// hover background
.sbsb_d {
background: transparent !important;
}
// result window background
.sbsb_a {
background: alpha(#000, 43%) !important;
}
// result text animation
.sbsb_c {
opacity: 0.8;
transition: all 0.6s ease-in-out;
}
// Search result - hovering
.sbsb_d {
opacity: 1;
text-shadow: #fff 1px 0 10px;
border-radius: 69em;
transition: all 0s;
cursor: pointer;
}
//
// animation show/hide search results
//
.gstl_50.sbdd_a {
display: block !important;
transition: all 0.2s ease-in-out;
}
.gstl_50.sbdd_a[style*="display: none"] {
opacity: 0;
translate: 0em -10px;
pointer-events: none;
}
tp-yt-paper-tooltip {
display: none;
}
// nice searchbox glow, probably too much tho
/* ytd-searchbox.ytd-masthead {
transition: filter .3s;
&[has-focus] {
filter: drop-shadow(alpha(accent-color, 63%) 0px 0px 2em);
}
} */
// clear button (who would have guessed)
#search-clear-button {
transition: filter .1s;
display: flex !important;
filter: opacity(1);
&[hidden] {
filter: opacity(0);
pointer-events: none;
}
}
// search button (right)
#search-icon-legacy {
background: #222 !important;
filter: drop-shadow(var(--yt-spec-base-background) 0px 0px 10px);
z-index: 1;
yt-icon-shape svg {
transition: filter 0.2s ease-in-out;
}
&:hover yt-icon-shape svg {
filter: drop-shadow(0 0 3px white);
}
}
// searchbox focused
ytd-searchbox[has-focus] #container.ytd-searchbox {
border: accent-color solid 1px;
border-right: none;
box-shadow: alpha(accent-color, 63%) 0px 0px 7px 1px;
}
// left sidemenu
ytd-mini-guide-renderer {
background: transparent;
opacity: 1;
transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
&[hidden] {
display: block !important;
opacity: 0;
user-select: none;
transform: translateX(-70px);
#endpoint {
cursor: default !important;
}
}
}
//
// right hamburger button
//
yt-icon-button#guide-button {
transition: all 0.2s ease-in-out;
}
@media(max-width:1312px) {
yt-icon-button#guide-button {
margin-right: -48px !important;
opacity: 0;
}
}
/* ytd-page-manager#page-manager {
&:has(yt-page-navigation-progress:not([hidden])){
opacity: 0 !important;
filter: invert(1);
}
} */
}
@-moz-document regexp("https:\\/\\/www\\.youtube\\.com\\/(?!e)[\\w\\/?=]*") {
/* anywhere else on yt
not triggering the /embed */
@keyframes whaspopin {
from {
opacity: 0
}
to {
opacity: 1
}
}
@keyframes whaspopulse {
0% {
opacity: 1
}
50% {
opacity: 0
}
100% {
opacity: 1
}
}
@keyframes whaspopout {
from {
opacity: 1
}
to {
opacity: 0
}
}
#masthead-skeleton-icons,
div#home-page-skeleton,
.ghost-card {
display: none !important;
}
div#progress {
background accent-color !important;
box-shadow: alpha(accent-color, 69%) 0 0 20px 5px;
}
yt-page-navigation-progress {
z-index: 99999999 !important;
bottom: 0;
opacity: 1;
height: unset;
background: var(--yt-spec-base-background);
transition: opacity 0.4s ease-in-out;
}
//
// loading transition
//
body[dir="ltr"],
yt-page-navigation-progress {
&[hidden] {
display: block !important;
position: absolute;
opacity: 0;
}
&::before, &::after {
content: '';
pointer-events: none;
position: absolute;
inset: 0;
}
&::before {
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='800' width='1200' viewBox='-76.185 -28.34675 660.27 170.0805'%3E%3Cpath d='M158.595 17.705a20.285 20.285 0 00-14.32-14.32C131.642 0 80.99 0 80.99 0S30.337 0 17.705 3.385a20.286 20.286 0 00-14.32 14.32C0 30.338 0 56.693 0 56.693S0 83.049 3.385 95.68A20.285 20.285 0 0017.705 110c12.632 3.386 63.285 3.386 63.285 3.386s50.652 0 63.285-3.386a20.284 20.284 0 0014.32-14.32c3.385-12.632 3.385-38.988 3.385-38.988s0-26.355-3.385-38.988' fill='red'/%3E%3Cpath d='M64.792 80.99l42.082-24.297-42.082-24.297zm188.276 11.04c.887-2.314 1.332-6.098 1.332-11.35V58.556c0-5.097-.445-8.822-1.332-11.178-.888-2.355-2.452-3.533-4.69-3.533-2.163 0-3.69 1.178-4.577 3.533-.888 2.356-1.332 6.081-1.332 11.178V80.68c0 5.25.424 9.035 1.275 11.35.848 2.318 2.392 3.475 4.633 3.475 2.239 0 3.803-1.157 4.691-3.475zm-17.953 11.122c-3.207-2.16-5.486-5.52-6.835-10.079-1.352-4.554-2.027-10.617-2.027-18.185v-10.31c0-7.644.771-13.784 2.316-18.417 1.544-4.633 3.956-8.011 7.24-10.135 3.282-2.123 7.587-3.186 12.916-3.186 5.251 0 9.459 1.082 12.626 3.243 3.165 2.162 5.482 5.542 6.95 10.136 1.466 4.595 2.2 10.715 2.2 18.36v10.31c0 7.567-.714 13.65-2.142 18.243-1.43 4.595-3.747 7.955-6.951 10.077-3.205 2.124-7.548 3.186-13.03 3.186-5.64 0-10.06-1.082-13.263-3.243m248.053-57.981c-.81 1.005-1.352 2.646-1.621 4.923-.272 2.278-.404 5.734-.404 10.367v5.097h11.697V60.46c0-4.555-.155-8.011-.463-10.367-.309-2.355-.868-4.014-1.678-4.98-.812-.966-2.067-1.449-3.766-1.449-1.7 0-2.954.503-3.765 1.506zm-2.025 29.886v3.591c0 4.557.132 7.974.404 10.251.269 2.279.828 3.94 1.68 4.982.849 1.041 2.16 1.564 3.938 1.564 2.392 0 4.035-.927 4.923-2.781.887-1.853 1.37-4.942 1.447-9.268l13.785.812c.077.62.116 1.469.116 2.548 0 6.565-1.795 11.47-5.387 14.712-3.589 3.242-8.669 4.865-15.232 4.865-7.876 0-13.398-2.47-16.564-7.414-3.168-4.94-4.75-12.586-4.75-22.935V63.589c0-10.657 1.641-18.436 4.924-23.342 3.281-4.903 8.9-7.355 16.854-7.355 5.482 0 9.691 1.004 12.626 3.012 2.933 2.01 5 5.137 6.197 9.383 1.197 4.247 1.796 10.117 1.796 17.607v12.163h-26.757m-284.953-1.33l-18.187-65.68h15.869l6.37 29.77c1.623 7.339 2.82 13.594 3.591 18.766h.464c.54-3.706 1.738-9.922 3.591-18.65l6.603-29.886h15.869l-18.417 65.68v31.51h-15.754v-31.51M322.115 34.23v71.007h-12.511l-1.39-8.688h-.347c-3.399 6.564-8.496 9.845-15.291 9.845-4.71 0-8.185-1.543-10.425-4.633-2.24-3.087-3.359-7.915-3.359-14.48V34.23h15.985v52.126c0 3.168.348 5.426 1.043 6.776.695 1.353 1.853 2.027 3.475 2.027 1.39 0 2.722-.423 3.996-1.275 1.274-.849 2.22-1.928 2.838-3.241V34.229h15.986m81.995.001v71.007h-12.511l-1.391-8.688h-.345c-3.402 6.564-8.498 9.845-15.292 9.845-4.711 0-8.186-1.543-10.426-4.633-2.24-3.087-3.358-7.915-3.358-14.48V34.23h15.985v52.126c0 3.168.347 5.426 1.041 6.776.696 1.353 1.855 2.027 3.476 2.027 1.391 0 2.723-.423 3.996-1.275 1.275-.849 2.22-1.928 2.839-3.241V34.229h15.985' fill='%23fff'/%3E%3Cpath d='M365.552 20.908h-15.87v84.329h-15.637v-84.33h-15.869V8.05h47.376v12.858m76.811 53.636c0 5.174-.215 9.229-.639 12.162-.424 2.937-1.139 5.021-2.143 6.255-1.004 1.236-2.357 1.854-4.053 1.854a7.404 7.404 0 01-3.65-.927c-1.12-.618-2.026-1.544-2.722-2.78V50.796c.54-1.93 1.467-3.513 2.78-4.749 1.313-1.234 2.74-1.853 4.285-1.853 1.623 0 2.876.637 3.766 1.91.886 1.275 1.505 3.418 1.853 6.43.348 3.011.523 7.297.523 12.857zm14.652-28.964c-.967-4.478-2.531-7.721-4.692-9.73-2.163-2.007-5.136-3.011-8.919-3.011-2.935 0-5.676.83-8.224 2.49a16.926 16.926 0 00-5.908 6.545h-.117l.001-37.416h-15.405v100.777h13.204l1.622-6.717h.347c1.235 2.393 3.088 4.285 5.56 5.675 2.47 1.39 5.213 2.085 8.225 2.085 5.404 0 9.382-2.491 11.931-7.471 2.548-4.982 3.823-12.76 3.823-23.341V64.23c0-7.953-.484-14.17-1.448-18.65' fill='%23fff'/%3E%3C/svg%3E");
background-size: 50vh;
background-position: center;
background-repeat: no-repeat;
}
&::after {
text-align: center;
top: 55%;
font-size: 2.5vh; // so that the font is kinda static size
color: alpha(white, 50%);
content: "by cubiq 🤍";
}
}
body[dir="ltr"]:not([rounded-container])::after {
animation: whaspopin 0.4s forwards;
}
body[rounded-container]::after {
animation: whaspopout 0.4s forwards;
}
// hide video content on loading transition
ytd-app:has(yt-page-navigation-progress:not([hidden])){
ytd-page-manager#page-manager {
opacity: 0 !important;
}
}
}