Skip to content

Commit b30dd2b

Browse files
committed
hoarding prev version too, however making users first try the new as pull requested
1 parent 48559dc commit b30dd2b

File tree

3 files changed

+30
-0
lines changed

3 files changed

+30
-0
lines changed

js&css/extension/www.youtube.com/appearance/comments/comments.css

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,20 @@
99
# Hide avatars
1010
--------------------------------------------------------------*/
1111

12+
13+
@media screen and (min-width: 1599px) {
14+
html[data-page-type=video][it-comments-sidebar-simple='true'] #player { margin-left: -20px !important;}
15+
html[data-page-type=video][it-comments-sidebar-simple='true'] #columns { display:flex !important; max-width:100% !important;}
16+
html[data-page-type=video][it-comments-sidebar-simple='true'] #comments { max-width: min(850px, 19vw) !important; margin-left:-12px; }
17+
html[data-page-type=video][it-comments-sidebar-simple='true'][it-sidebar-left='true'] #comments { max-right: -25px !important; }
18+
html[data-page-type=video][it-comments-sidebar-simple='true'] #related { margin-right: -22px !important; max-width: max(360px, 18vw) !important; }
19+
html[data-page-type=video][it-comments-sidebar-simple='true'] #secondary { margin-right: -22px !important; max-width: max(360px, 18vw) !important; }
20+
21+
html[data-page-type=video][it-comments-sidebar-simple='true']:not([it-player-size='1080p']):not([it-player-size='1440p']):not([it-player-size='2160p']):not([it-player-size='custom']):not([it-player-size='max_width']) ytd-watch-flexy:not([fullscreen]) #primary {
22+
min-width: min(calc(100vw - 1000px), 1260px) !important; max-width: 1260px !important; }
23+
24+
25+
1226
/* 2 COLS FEATURE */
1327
@media screen and (min-width: 1952px) {
1428
html[data-page-type=video][it-comments-sidebar='true'] ytd-watch-flexy #related { flex-shrink: 4; min-width: 300px;}

js&css/web-accessible/www.youtube.com/appearance.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,18 @@ ImprovedTube.playerRemainingDuration = function () {
135135
element.remove();
136136
}
137137
};
138+
/*------------------------------------------------------------------------------
139+
Comments Sidebar Simple
140+
------------------------------------------------------------------------------*/
141+
ImprovedTube.commentsSidebarSimple = function() { if(ImprovedTube.storage.comments_sidebar_simple === true){
142+
if(window.matchMedia("(min-width: 1599px)").matches) {
143+
document.querySelector("#primary").insertAdjacentElement('afterend', document.querySelector("#comments"));}
144+
if(window.matchMedia("(max-width: 1598px)").matches) {
145+
document.querySelector("#related").insertAdjacentElement('beforebegin', document.querySelector("#comments"));
146+
setTimeout(function () {
147+
document.querySelector("#primary-inner").appendChild(document.querySelector("#related"));}
148+
);}
149+
}
138150
/*------------------------------------------------------------------------------
139151
Comments Sidebar
140152
------------------------------------------------------------------------------*/

menu/skeleton-parts/appearance.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -694,6 +694,10 @@ extension.skeleton.main.layers.section.appearance.on.click.comments = {
694694
component: "switch",
695695
text: "sidebar"
696696
},
697+
comments_sidebar_simple: {
698+
component: "switch",
699+
text: "sidebar simple"
700+
},
697701
squared_user_images: {
698702
component: 'switch',
699703
text: 'squaredUserImages',

0 commit comments

Comments
 (0)