-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathxcellent.user.css
386 lines (314 loc) · 9.14 KB
/
xcellent.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
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
/* ==UserStyle==
@name Xcellent
@namespace github.com/Himither
@homepageURL https://github.com/Himither/Xcellent
@supportURL https://github.com/Himither/Xcellent/issues
@version 1.0.20
@updateURL https://raw.githubusercontent.com/Himither/Xcellent/master/xcellent.user.css
@description Adjustable timeline width, hide ads, hide stuff, show stuff only on hover & more
@author Himither
@license MIT
@preprocessor stylus
@var checkbox wide "Make it wide" 1
@var checkbox timeline-grok "Hide grok stuff" 0
@var text Timeline "━━━━━━⮞【Timeline】" '_'
@var range timeline-width "Timline max-width" [900, 600, 1800, 1, "px"]
@var checkbox timeline-header "Non-sticky timline header" 0
@var checkbox timeline-hideFollow "Hide 'Who to follow'" 0
@var checkbox timeline-hideAds "Hide Ads" 0
@var checkbox timeline-outerBorders "Hide borders around timeline" 0
@var checkbox timeline-postBorders "Hide borders between posts" 0
@var checkbox timeline-imgBorders "Hide borders around images" 0
@var checkbox timeline-quoteBorders "Hide borders around quotes" 0
@var checkbox timeline-quoteImg "Round top corners for quote images" 0
@var text Sidemenu "━━━━━━⮞【Sidemenu】" '_'
@var checkbox sidemenu-hover "Show menu only on hover" 0
@var checkbox sidemenu-hidePremium "Hide 'Premium' button" 0
@var checkbox sidemenu-hideJobs "Hide 'Jobs' button" 0
@var checkbox sidemenu-hideVerifiedOrgs "Hide 'Verified Orgs' button" 0
@var checkbox sidemenu-hidePost "Hide 'Post' button" 0
@var text Sidebar "━━━━━━⮞【Sidebar】" '_'
@var checkbox sidebar-hover "Show sidebar only on hover" 0
@var checkbox sidebar-hideSearch "Hide sidebar searchbar" 0
@var checkbox sidebar-hideFollow "Hide sidebar 'Who to follow'" 0
@var checkbox sidebar-hideTrends "Hide sidebar 'What's happening'" 0
@var checkbox sidebar-hideLegalNotice "Hide sidebar legal notice" 0
@var text Other "━━━━━━⮞【Other】" '_'
@var checkbox other-hoverMessages "Show Messages only on hover" 0
@var checkbox other-hateBorders "Make all borders transparent" 0
==/UserStyle== */
@-moz-document url-prefix("https://x.com") {
/* Formerly known as Twitter ¯\_(ツ)_/¯ */
:root:has(body[style*="rgb(0"]) {
--bg: rgb(0, 0, 0);
}
:root:has(body[style*="rgb(21"]) {
--bg: rgb(21, 32, 43);
}
:root:has(body[style*="rgb(255"]) {
--bg: rgb(255, 255, 255);
}
if wide {
html {
overflow-x: hidden;
}
header[role="banner"] {
position: absolute !important;
left: 0 !important;
}
header[role="banner"] > div {
position: absolute !important;
left: 0 !important;
margin-left: 0 !important;
}
header[role="banner"] > div > div {
left: 0 !important;
}
main[role="main"] > div {
width: 100dvw !important;
}
[data-testid="primaryColumn"] {
position: absolute !important;
left: 275px !important;
width: auto !important;
margin: auto !important;
max-width: timeline-width !important;
right: calc(382px + 32px) !important;
transform: translateX(0) !important;
}
[data-testid="primaryColumn"] > div > div:last-child,
[data-testid="primaryColumn"] > div > div:last-child > div > div {
min-width: unset !important;
max-width: unset !important;
width: 100% !important;
margin: 0 !important;
}
[data-testid="sidebarColumn"] {
position: absolute !important;
right: 0 !important;
padding-right: 32px !important;
margin-right: 0 !important;
width: 382px !important;
min-width: unset !important;
max-width: unset !important;
}
[data-testid="sidebarColumn"] > div {
align-items: flex-end !important;
width: 100% !important;
}
[data-testid="sidebarColumn"] > div > div {
width: 350px !important;
}
if sidemenu-hover or sidebar-hover {
[data-testid="primaryColumn"] {
transition: all 300ms ease-in-out !important;
}
}
if sidemenu-hover {
[data-testid="primaryColumn"] {
left: 0 !important;
}
header[role="banner"] > div > div {
background-color: var(--bg) !important;
}
}
if sidebar-hover {
[data-testid="primaryColumn"] {
z-index: 0 !important;
right: 32px !important;
}
[data-testid="sidebarColumn"]:hover {
width: 414px !important;
background-color: var(--bg) !important;
}
}
@media screen and (max-width: 1264px) {
header[role="banner"] > div > div > div {
width: 68px !important;
}
[data-testid="primaryColumn"] {
left: 68px !important;
}
}
@media screen and (max-width: 987px) {
[data-testid="primaryColumn"] {
right: 0 !important;
}
}
@media screen and (max-width: 499px) {
[data-testid="primaryColumn"] {
left: 0 !important;
}
}
}
if timeline-grok {
div[data-testid="GrokDrawer"],
button[aria-label*="Grok"],
a[aria-label*="Grok"],
button:has(path[d*="21h4.241L6.446"]),
[data-testid="tweet"] div:has(> nav) {
display: none;
}
}
/* ━━━━━━⮞ Timeline */
if timeline-header {
[data-testid="primaryColumn"] > div > div:first-child {
position: unset !important;
}
}
if timeline-outerBorders {
[data-testid="primaryColumn"] {
border-color: transparent !important
}
}
if timeline-hideFollow {
div[aria-label$="posts"] > div > div:not(:has(:is(article, a[href^="/i/status"], [role="progressbar"], button > div > svg))) {
display: none !important;
}
}
if timeline-hideAds {
main section > div > div > div:has(article > div > div > div > div > div > div > div > div > div > span) {
display: none !important;
}
}
if timeline-postBorders or other-hateBorders {
[data-testid="primaryColumn"] nav {
border-bottom-color: transparent;
}
[data-testid="primaryColumn"] [role="separator"] {
background-color: var(--bg);
}
}
if timeline-imgBorders {
[data-testid="primaryColumn"] div[id^="id__"] > div > div > div > div {
border-color: transparent !important
}
}
if timeline-quoteBorders {
[data-testid="primaryColumn"] div[id^="id__"] > div:last-child[role="link"] {
border-color: transparent !important
}
}
if timeline-quoteImg {
div[data-testid="tweetPhoto"] {
border-radius: 16px;
}
}
/* ━━━━━━⮞ Side menu */
if sidemenu-hover {
header[role="banner"] > div > div {
opacity: 0 !important;
transition: all 300ms ease-in-out !important;
}
header[role="banner"] > div > div:hover {
opacity: 1 !important;
}
if wide {
header[role="banner"] > div > div {
left: calc(-275px + 32px) !important;
}
header[role="banner"] > div > div:hover {
left: 0px !important;
}
@media screen and (max-width: 1264px) {
header[role="banner"] > div > div {
left: calc(-88px + 32px) !important;
}
header[role="banner"] > div > div:hover {
left: 0 !important;
}
}
}
}
if sidemenu-hidePremium {
header a[data-testid="premium-hub-tab"] {
display: none;
}
}
if sidemenu-hideJobs {
header a[data-testid="jobs-tab-item"] {
display: none;
}
}
if sidemenu-hideVerifiedOrgs {
header a[data-testid="vo-signup-tab"] {
display: none;
}
}
if sidemenu-hidePost {
header div:has(> a[data-testid="SideNav_NewTweet_Button"]) {
display: none;
}
}
/* ━━━━━━⮞ Sidebar */
if sidebar-hover {
[data-testid="sidebarColumn"] {
height: 100dvh !important;
opacity: 0 !important;
transition: all 300ms ease-in-out !important;
}
[data-testid="sidebarColumn"]:hover {
opacity: 1 !important;
}
if wide {
[data-testid="sidebarColumn"] {
transition: all 300ms ease-in-out !important;
}
[data-testid="sidebarColumn"] {
transform: translateX(calc(100% - 32px)) !important;
}
[data-testid="sidebarColumn"] {
position: fixed !important;
}
[data-testid="sidebarColumn"]:hover {
transform: translateX(0) !important;
}
[data-testid="sidebarColumn"]:hover > div > div > div > div > div > div:first-child {
transform: translateX(0) !important;
}
}
}
if sidebar-hideSearch {
[data-testid="sidebarColumn"]:has(section) > div > div > div > div > div > div:nth-child(1) {
display: none !important;
}
}
if sidebar-hideTrends {
[data-testid="sidebarColumn"]:has(section) div:has(> section) {
display: none !important;
}
}
if sidebar-hideLegalNotice {
[data-testid="sidebarColumn"]:has(section) div:has(> nav) {
display: none !important;
}
}
/* ━━━━━━⮞ Others */
if other-hoverMessages {
div#layers div[data-testid="DMDrawer"] {
opacity: 0 !important;
transform: translateX(90%) !important;
margin-right: 0px !important;
padding-right: 32px !important;
transition: all 300ms ease-in-out !important;
}
div#layers div[data-testid="DMDrawer"]:hover {
opacity: 1 !important;
transform: translateX(0) !important;
}
}
if other-hateBorders {
* {
border-color: transparent !important;
}
}
}
@-moz-document url-prefix("https://x.com/home") {
/* Home /*
/* ━━━━━━⮞ Sidebar */
if sidebar-hideFollow {
[data-testid="sidebarColumn"]:has(section) div:has(> div > aside) {
display: none !important;
}
}
}