-
Notifications
You must be signed in to change notification settings - Fork 0
/
rowsfix.user.css
136 lines (118 loc) · 4.08 KB
/
rowsfix.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
/* ==UserStyle==
@name YouTube - More video rows
@description Fixes that ugly change where only 4 rows of videos are visble on channel's video page, makes row count fully customizable, also supports subscription feed and home pages
@namespace github.com/Roki100/YouTube-rows-fix
@homepageURL https://github.com/Roki100/YouTube-rows-fix
@updateURL https://raw.githubusercontent.com/Roki100/YouTube-rows-fix/main/rowsfix.user.css
@version 1.1.4
@license GPL3.0
@author Roki_100 & jiraph
@preprocessor stylus
@var number rows "Number of video rows" 6
@var checkbox thumbs "Customize thumbnail size" 0
@var range -width "Thumbnail Size" [1284, 1000, 2000, 'px']
@var checkbox fullwidth "Force fullscreen width grid" 0
@var checkbox thumbradius "Customize thumbnail corner radius" 0
@var range -radius "Thumbnail Corner Radius" [12, 0, 12, 'px']
@var checkbox channelPage "Activate on channel page" 1
@var checkbox feedPage "Activate on subscriptions page" 0
@var checkbox homePage "Activate on home page" 0
@var checkbox nukeShorts "Nuke Shorts on feed&home (Fixes issues)" 0
@var checkbox userscript "Enable UserScript Compatibility layer support" 0
@var number shortsrows "Number of shorts rows (Userscript only)" 8
==/UserStyle== */
exec() {
ytd-rich-grid-renderer {
--ytd-rich-grid-items-per-row: rows !important;
--ytd-rich-grid-posts-per-row: rows !important;
}
#contents>ytd-rich-grid-row,
#contents>ytd-rich-grid-row>#contents {
display: contents;
}
ytd-video-meta-block[rich-meta] #metadata-line.ytd-video-meta-block {
font-size: 1.2rem;
line-height: 1.8rem;
max-height: 3.6rem;
}
#video-title.ytd-rich-grid-media {
font-size: 1.4rem;
line-height: 2rem;
max-height: 4rem;
}
#header.ytd-rich-grid-renderer {
width: 100%;
}
ytd-rich-item-renderer {
margin: 8px 2px !important;
margin-bottom: 24px;
margin-right: 4px;
margin-left: 0px;
width: calc(100%/var(--ytd-rich-grid-items-per-row) - 4px);
}
.ytd-two-column-browse-results-renderer {
padding-inline: 6px;
}
if thumbs {
ytd-two-column-browse-results-renderer.style-scope {
max-width: -width !important;
}
ytd-two-column-browse-results-renderer.grid-6-columns {
width: 100% !important;
}
}
if thumbradius {
ytd-thumbnail[size="large"] a.ytd-thumbnail, ytd-thumbnail[size="large"]::before {
border-radius: -radius;
}
}
if fullwidth {
ytd-two-column-browse-results-renderer.grid:not(.grid-disabled):has(ytd-rich-grid-renderer:not([is-shorts-grid])) {
max-width: 100% !important;
width: 100% !important;
}
}
}
@-moz-document regexp("^(https?://)(?:www.)?youtube.com/(?:@)?(?:[\w.-]+|(?:c|channel)/[\w-]+)/videos(\?.*)?$") {
if channelPage {
exec()
}
}
@-moz-document regexp("^(https?://)(www\.)?youtube\.com/feed/subscriptions(\?.*)?$") {
if feedPage {
exec()
}
if nukeShorts {
[page-subtype="subscriptions"] {
ytd-item-section-renderer,
ytd-rich-section-renderer,
ytd-grid-video-renderer, ytd-rich-item-renderer {
&:has(a[href^="/shorts/"]) {
display: none;
}
}
}
}
if userscript {
:root {
--rowsfix-by-roki-userscript-rows: rows;
--rowsfix-by-roki-userscript-shortsrows: shortsrows;
}
}
}
@-moz-document regexp("^(https?://)(www\.)?youtube\.com/(/\?.*)?$") {
if homePage {
exec()
}
if nukeShorts {
[page-subtype='home'] ytd-rich-section-renderer:has(a[href^="/shorts/"]) {
display: none;
}
}
if userscript {
:root {
--rowsfix-by-roki-userscript-rows: rows;
--rowsfix-by-roki-userscript-shortsrows: shortsrows;
}
}
}