Skip to content

Commit

Permalink
Merge branch 'code-charity:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
unnamed-orbert authored Mar 7, 2024
2 parents 213eaa2 + 967ccbb commit 9328c06
Show file tree
Hide file tree
Showing 16 changed files with 503 additions and 428 deletions.
87 changes: 46 additions & 41 deletions js&css/extension/www.youtube.com/appearance/comments/comments.css
Original file line number Diff line number Diff line change
Expand Up @@ -61,30 +61,28 @@ html[it-comments='collapsed'][data-page-type=video] ytd-comments:not([it-activat
pointer-events: none !important;
}




@media screen and (min-width: 1599px) {
html[data-page-type=video][it-comments-sidebar-simple='true'][it-columns=true] #player { margin-left: -20px !important;}
html[data-page-type=video][it-comments-sidebar-simple='true'][it-columns=true] #columns { display:flex !important; max-width:100% !important;}
html[data-page-type=video][it-comments-sidebar-simple='true'][it-columns=true] #comments { max-width: min(850px, 19vw) !important; margin-left:-12px; }
html[data-page-type=video][it-comments-sidebar-simple='true'][it-columns=true][it-sidebar-left='true'] #comments { max-right: -25px !important; }
html[data-page-type=video][it-comments-sidebar-simple='true'][it-columns=true] #related { margin-right: -22px !important; max-width: max(360px, 18vw) !important; }
html[data-page-type=video][it-comments-sidebar-simple='true'][it-columns=true] #secondary { margin-right: -22px !important; max-width: max(360px, 18vw) !important; }

html[data-page-type=video][it-comments-sidebar-simple='true'][it-columns=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 {
min-width: min(calc(100vw - 1000px), 1260px) !important; max-width: 1260px !important; }
@media screen and (min-width: 1599px) {
html[data-page-type=video][it-comments-sidebar-simple='true'][it-columns=true] #player {margin-left: -20px !important;}
html[data-page-type=video][it-comments-sidebar-simple='true'][it-columns=true] #columns {display:flex !important; max-width:100% !important;}
html[data-page-type=video][it-comments-sidebar-simple='true'][it-columns=true] #comments {max-width: min(850px, 19vw) !important; margin-left:-12px;}
html[data-page-type=video][it-comments-sidebar-simple='true'][it-columns=true][it-sidebar-left='true'] #comments {max-right: -25px !important;}
html[data-page-type=video][it-comments-sidebar-simple='true'][it-columns=true] #related {margin-right: -22px !important; max-width: max(360px, 18vw) !important;}
html[data-page-type=video][it-comments-sidebar-simple='true'][it-columns=true] #secondary {margin-right: -22px !important; max-width: max(360px, 18vw) !important;}

html[data-page-type=video][it-comments-sidebar-simple='true'][it-columns=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 {
min-width: min(calc(100vw - 1000px), 1260px) !important; max-width: 1260px !important;
}
}

/* 2 COLS FEATURE */
@media screen and (min-width: 1952px) {
html[data-page-type=video][it-comments-sidebar='true'][it-columns=true] ytd-watch-flexy #related { flex-shrink: 4; min-width: 300px;}
html[data-page-type=video][it-comments-sidebar='true'][it-columns=true] ytd-watch-flexy:not([theater]):not([fullscreen]) #related { width: auto !important;}
html[data-page-type=video][it-comments-sidebar='true'][it-columns=true] ytd-watch-flexy #columns { max-width: 100%;}
html[data-page-type=video][it-comments-sidebar='true'][it-columns=true] ytd-watch-flexy #related {flex-shrink: 4; min-width: 300px;}
html[data-page-type=video][it-comments-sidebar='true'][it-columns=true] ytd-watch-flexy:not([theater]):not([fullscreen]) #related {width: auto !important;}
html[data-page-type=video][it-comments-sidebar='true'][it-columns=true] ytd-watch-flexy #columns {max-width: 100%;}
html[data-page-type=video][it-comments-sidebar='true'][it-columns=true] ytd-watch-flexy #secondary {min-width: 300px !important; max-width: 420px;}
html[data-page-type=video][it-comments-sidebar='true'][it-columns=true] ytd-watch-flexy #primary {
flex: 0 0 auto;
max-width: 1280px !important;
max-width: 1280px !important;
}
html[data-page-type=video][it-comments-sidebar='true'][it-columns=true][it-sidebar-left='true'] ytd-watch-flexy:not([theater]):not([fullscreen]) #secondary {flex-shrink: 2;}

Expand All @@ -105,29 +103,29 @@ min-width: min(calc(100vw - 1000px), 1260px) !important; max-width: 1260px !impo
html[data-page-type=video][it-comments-sidebar='true'][it-columns=true][it-sidebar-left='true'] ytd-watch-flexy #primary {padding: 0 14px}
html[data-page-type=video][it-comments-sidebar='true'][it-columns=true][it-sidebar-left='true'] ytd-watch-flexy #secondary-inner {padding-right: 24px; padding-left: 14px}
html[data-page-type=video][it-comments-sidebar='true'][it-columns=true][it-sidebar-left='true'] ytd-watch-flexy:not([theater]):not([fullscreen]) #related,
html[data-page-type=video][it-comments-sidebar='true'][it-columns=true] ytd-watch-flexy:not([theater]):not([fullscreen]) #related{ height: inherit; overflow-y: scroll}
html[data-page-type=video][it-comments-sidebar='true'][it-columns=true] ytd-watch-flexy:not([theater]):not([fullscreen]) #related{height: inherit; overflow-y: scroll}
html[data-page-type=video][it-comments-sidebar='true'][it-columns=true][it-sidebar-left='true'] ytd-watch-flexy #secondary{border-right: 1px solid var(--yt-spec-10-percent-layer)}
html[data-page-type=video][it-comments-sidebar='true'][it-columns=true]:not([it-sidebar-left='true']) ytd-watch-flexy #secondary{border-left: 1px solid var(--yt-spec-10-percent-layer)}
html[data-page-type=video][it-comments-sidebar='true'][it-columns=true] ytd-watch-flexy #related > :first-child {padding-top: 24px;}

html[data-page-type=video][it-comments-sidebar='true'][it-columns=true][it-sidebar-left='true'] ytd-watch-flexy #related{ padding: 0 14px 0 24px; border-right: 1px solid var(--yt-spec-10-percent-layer) }
html[data-page-type=video][it-comments-sidebar='true'][it-columns=true]:not([it-sidebar-left='true']) ytd-watch-flexy #related{ padding: 0 24px 0 14px; border-left: 1px solid var(--yt-spec-10-percent-layer)}
html[data-page-type=video][it-comments-sidebar='true'][it-columns=true][it-sidebar-left='true'] ytd-watch-flexy #related{padding: 0 14px 0 24px; border-right: 1px solid var(--yt-spec-10-percent-layer)}
html[data-page-type=video][it-comments-sidebar='true'][it-columns=true]:not([it-sidebar-left='true']) ytd-watch-flexy #related{padding: 0 24px 0 14px; border-left: 1px solid var(--yt-spec-10-percent-layer)}
html[data-page-type=video][it-comments-sidebar='true'][it-columns=true] ytd-watch-flexy[theater] #columns,
html[data-page-type=video][it-comments-sidebar='true'][it-columns=true] ytd-watch-flexy[fullscreen] #columns {height: auto}
html[data-page-type=video][it-comments-sidebar='true'][it-columns=true][it-sidebar-left='true'] ytd-watch-flexy #secondary{border-left: 1px solid var(--yt-spec-10-percent-layer)}

/* or unset */
html[data-page-type=video][it-comments-sidebar='true'][it-columns=true] #columns {max-width: 2400px !important; }
html[data-page-type=video][it-comments-sidebar='true'][it-columns=true] #columns {max-width: 2400px !important;}
}

@media screen and (min-width: 1000px) and (max-width: 1951px) {
html[data-page-type=video][it-comments-sidebar='true'] ytd-watch-flexy #primary {max-width: calc((100% - 420px) - 48px) !important;} /*UP TO (-658px)*/
html[data-page-type=video][it-comments-sidebar='true'] ytd-watch-flexy:not([theater]):not([fullscreen]) #secondary { width: unset !important; max-width: 420px !important;} /*UP TO 658px*/
html[data-page-type=video][it-comments-sidebar='true'] ytd-watch-flexy:not([theater]):not([fullscreen]) #secondary {width: unset !important; max-width: 420px !important;} /*UP TO 658px*/
html[data-page-type=video][it-comments-sidebar='true'] ytd-watch-flexy #columns {max-width: 100%; min-width: unset !important;}
html[data-page-type=video][it-comments-sidebar='true'] ytd-watch-flexy #secondary { margin-right: 0; padding-right: 0 !important; min-width: 300px !important;}
html[data-page-type=video][it-comments-sidebar='true'] ytd-watch-flexy #secondary {margin-right: 0; padding-right: 0 !important; min-width: 300px !important;}
html[data-page-type=video][it-comments-sidebar='true'] ytd-watch-flexy #secondary-inner {padding-left: 24px; padding-right: 24px;}
html[data-page-type=video][it-comments-sidebar='true'] ytd-watch-flexy[theater] #primary,
html[data-page-type=video][it-comments-sidebar='true'] ytd-watch-flexy[fullscreen] #primary{
html[data-page-type=video][it-comments-sidebar='true'] ytd-watch-flexy[fullscreen] #primary {
margin: 0;
padding: 24px 24px 0 24px;
}
Expand All @@ -139,7 +137,7 @@ min-width: min(calc(100vw - 1000px), 1260px) !important; max-width: 1260px !impo
@media screen and (min-width: 1000px){
html[data-page-type=video][it-comments-sidebar='true'] ytd-watch-flexy #primary,
html[data-page-type=video][it-comments-sidebar='true'] ytd-watch-flexy #secondary{margin-top: 0 !important; padding-top: 0 !important; padding-right: 0; flex-grow: 1;}
html[data-page-type=video][it-comments-sidebar='true'] ytd-watch-flexy #secondary::before { content: ""; height: 24px; display: block;}
html[data-page-type=video][it-comments-sidebar='true'] ytd-watch-flexy #secondary::before {content: ""; height: 24px; display: block;}
html[data-page-type=video][it-comments-sidebar='true'] ytd-watch-flexy #primary {flex: 1 0 auto;padding: 0 24px; margin: 0;}
html[data-page-type=video][it-comments-sidebar='true'][it-player-size="do_not_change"] ytd-watch-flexy #primary-inner {padding-top: 24px;}
html[data-page-type=video][it-comments-sidebar='true'] ytd-watch-flexy #player {margin: 0 auto;}
Expand All @@ -152,25 +150,27 @@ min-width: min(calc(100vw - 1000px), 1260px) !important; max-width: 1260px !impo
/* DIFFERENT HEADERS HEIGHT */
html[data-page-type=video][it-comments-sidebar='true'][it-header-position=normal] ytd-watch-flexy:not([theater]):not([fullscreen]) #columns, /* BUG: if header has never been changed back and forth to normal, [it-header-position=normal] selector isn't applied */
html[data-page-type=video][it-comments-sidebar='true']:not([it-header-position^=h]) ytd-watch-flexy:not([theater]):not([fullscreen]) #columns, /* temporary fix */
html[data-page-type=video][it-comments-sidebar='true'][it-header-position=static] #columns{
html[data-page-type=video][it-comments-sidebar='true'][it-header-position=static] #columns {
height: calc(100vh - 56px);
}
html[data-page-type=video][it-comments-sidebar='true'][it-header-position=hover] ytd-watch-flexy:not([theater]):not([fullscreen]) #columns,
html[data-page-type=video][it-comments-sidebar='true'][it-header-position=hover_on_video_page] ytd-watch-flexy:not([theater]):not([fullscreen]) #columns{
html[data-page-type=video][it-comments-sidebar='true'][it-header-position=hover_on_video_page] ytd-watch-flexy:not([theater]):not([fullscreen]) #columns {
height: calc(100vh - 14px);
}
html[data-page-type=video][it-comments-sidebar='true'][it-header-position=hidden] ytd-watch-flexy:not([theater]):not([fullscreen]) #columns,
html[data-page-type=video][it-comments-sidebar='true'][it-header-position=hidden_on_video_page] ytd-watch-flexy:not([theater]):not([fullscreen]) #columns{
html[data-page-type=video][it-comments-sidebar='true'][it-header-position=hidden_on_video_page] ytd-watch-flexy:not([theater]):not([fullscreen]) #columns {
height: calc(100vh);
}

html[data-page-type=video][it-comments-sidebar='true'] ytd-watch-flexy:not([theater]):not([fullscreen]) #primary,
html[data-page-type=video][it-comments-sidebar='true'] ytd-watch-flexy:not([theater]):not([fullscreen]) #secondary{
height: inherit; overflow-y: scroll; overflow-x: hidden !important;
html[data-page-type=video][it-comments-sidebar='true'] ytd-watch-flexy:not([theater]):not([fullscreen]) #secondary {
height: inherit;
overflow-y: scroll;
overflow-x: hidden !important;
}
html[data-page-type=video][it-comments-sidebar='true'] ytd-watch-flexy:not([theater]):not([fullscreen]) #columns {overflow: hidden;}
html[data-page-type=video][it-comments-sidebar='true'] ytd-watch-flexy[theater] #columns
html[data-page-type=video][it-comments-sidebar='true'] ytd-watch-flexy[fullscreen] #columns{
html[data-page-type=video][it-comments-sidebar='true'] ytd-watch-flexy[fullscreen] #columns {
height: auto;
}
}
Expand All @@ -180,28 +180,33 @@ html[data-page-type=video][it-comments-sidebar='true'] #contentContainer::after
html[data-page-type=video][it-comments-sidebar='true'] ytd-reel-shelf-renderer {width: 100%; padding: 0 16px; box-sizing: border-box;}
html[data-page-type=video][it-comments-sidebar='true'] ytd-watch-flexy #playlist,
html[data-page-type=video][it-comments-sidebar='true'] ytd-live-chat-frame#chat,
html[data-page-type=video][it-comments-sidebar='true'] ytd-watch-flexy #donation-shelf{
width: 100% !important; min-width: unset !important;
html[data-page-type=video][it-comments-sidebar='true'] ytd-watch-flexy #donation-shelf {
width: 100% !important;
min-width: unset !important;
}

/* GRID RELATED */
html[data-page-type=video][it-comments-sidebar='true'] #items.ytd-watch-next-secondary-results-renderer ytd-compact-video-renderer,
html[data-page-type=video][it-comments-sidebar='true'] #items.ytd-watch-next-secondary-results-renderer ytd-compact-radio-renderer,
html[data-page-type=video][it-comments-sidebar='true'] #items.ytd-watch-next-secondary-results-renderer ytd-compact-playlist-renderer,
html[data-page-type=video][it-comments-sidebar='true'] #items.ytd-watch-next-secondary-results-renderer ytd-continuation-item-renderer {
min-width: 300px; max-width: 420px !important; flex-grow: 1; flex-basis: 0 !important; margin-right: 8px;
min-width: 300px;
max-width: 420px !important;
flex-grow: 1;
flex-basis: 0 !important;
margin-right: 8px;
}

/* TO FIX #1693 untested: */
html[data-page-type=video]:not([it-player-size]) #playlist #items,
html[data-page-type=video]:not([it-player-size='do_not_change']) #playlist #items
{max-height: min(var(--it-player-height), 77vh); padding-bottom: 0;}
html[data-page-type=video]:not([it-player-size='do_not_change']) #playlist #items {
max-height: min(var(--it-player-height), 77vh);
padding-bottom: 0;
}

/* CUSTOM ENHANCEMENTS */
html[data-page-type=video][it-comments-sidebar='true'] #playlist #items
{ max-height: calc(70px * 4 + 4px) ; padding-bottom: 0;} /* currently shows up to 4 videos */
html[data-page-type=video][it-comments-sidebar='true'] #playlist #items {max-height: calc(70px * 4 + 4px); padding-bottom: 0;} /* currently shows up to 4 videos */

/* these were global without [it-comments-sidebar='true'] @D-Rekk */
html[data-page-type=video][it-comments-sidebar='true'] ytd-watch-flexy #chat > tp-yt-paper-button#label { width:calc(100% - 40px); }
html[data-page-type=video][it-comments-sidebar='true'] ytd-watch-flexy #right-arrow-container.ytd-merch-shelf-renderer { right: 44px !important; }

html[data-page-type=video][it-comments-sidebar='true'] ytd-watch-flexy #chat > tp-yt-paper-button#label {width:calc(100% - 40px);}
html[data-page-type=video][it-comments-sidebar='true'] ytd-watch-flexy #right-arrow-container.ytd-merch-shelf-renderer {right: 44px !important;}
31 changes: 16 additions & 15 deletions js&css/extension/www.youtube.com/appearance/details/details.css
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/*--------------------------------------------------------------
>>> DETAILS
----------------------------------------------------------------
--------------------------------------------------------------*/
/*--------------------------------------------------------------
# General /* WHY ?*/
# General
--------------------------------------------------------------*/
#info #info-text { max-height: 6rem; display: block; }
#info #info-text {max-height: 6rem; display: block;}
/*--------------------------------------------------------------
YouTube's Detail Buttons
--------------------------------------------------------------*/
Expand All @@ -16,14 +16,13 @@ html[it-youtubeDetailButtons='transparent_background'] #subscribe-button button,
html[it-youtubeDetailButtons='transparent_background'] #menu button {background-color:rgba(0, 0, 0, 0.2) !important;}
html[it-youtubeDetailButtons='transparent_background'] #subscribe-button button {color:#111 !important;}
/*------SHOW my DISLIKE in RED------*/
html[it-red-dislike-button='true'] #top-level-buttons-computed #segmented-dislike-button ytd-toggle-button-renderer *[aria-pressed='true'] yt-icon
{color: #f02200 !important;}
html[it-red-dislike-button='true'] #top-level-buttons-computed #segmented-dislike-button ytd-toggle-button-renderer *[aria-pressed='true'] yt-icon {color: #f02200 !important;}
/*------SUBSCRIBE BUTTON------*/
/* DISPLAY: NONE: */
html[it-subscribe='grey'] #subscribe-button button { background-color: #DDD !important; color:#111 !important; }
html[it-subscribe='transparent'] #subscribe-button button {background-color:rgba(0, 0, 0, 0.4) !important; color:#111 !important; }
html[it-subscribe='remove_label'] #subscribe-button button .yt-spec-button-shape-next__button-text-content,
html[it-subscribe='hidden'] #subscribe-button,
html[it-subscribe='grey'] #subscribe-button button {background-color: #DDD !important; color:#111 !important;}
html[it-subscribe='transparent'] #subscribe-button button {background-color:rgba(0, 0, 0, 0.4) !important; color:#111 !important;}
/* DISPLAY: NONE: */
html[it-subscribe='remove_label'] #subscribe-button button .yt-spec-button-shape-next__button-text-content,
html[it-subscribe='hidden'] #subscribe-button,
html[it-youtubeDetailButtons='remove_labels'] #menu ytd-button-renderer div:nth-child(2),
html[it-youtubeDetailButtons='remove_labels'] #menu ytd-button-renderer .cbox,
html[it-youtubeDetailButtons='remove_labels'] #subscribe-button .cbox,
Expand All @@ -45,7 +44,6 @@ html[it-hide-dislike-button='hidden'] #top-level-buttons-computed #segmented-dis
html[it-hide-dislike-button='icons_only'] #top-level-buttons-computed #segmented-dislike-button ytd-toggle-button-renderer div.cbox,
html[it-hide-dislike-button='icons_only'] #top-level-buttons-computed #segmented-dislike-button ytd-toggle-button-renderer yt-animated-rolling-number,
html[it-hide-dislike-button='icons_only'] #top-level-buttons-computed #segmented-dislike-button ytd-toggle-button-renderer .yt-spec-button-shape-next__button-text-content,

/*------# HIDE SHARE BUTTON------*/
html[it-hide-share-button='hidden'] #menu button:has(svg path[d^="M15 5.63 20.66"]),
html[it-hide-share-button='hidden'] #flexible-item-buttons button:has(svg path[d^="M15 5.63 20.66"]),
Expand Down Expand Up @@ -134,20 +132,23 @@ html[it-description='classic_hidden'] ytd-video-primary-info-renderer { padding-
html[it-description='classic'] div.style-scope.ytd-watch-flexy + ytd-watch-metadata,
html[it-description='classic_expanded'] div.style-scope.ytd-watch-flexy + ytd-watch-metadata,
html[it-description='classic_hidden'] div.style-scope.ytd-watch-flexy + ytd-watch-metadata
{display: none !important;}
html[it-description='classic_hidden'] div.style-scope.ytd-watch-flexy + ytd-watch-metadata {
display: none !important;
}
*/
/*--------------------------------------------------------------
# HOW LONG AGO THE VIDEO WAS UPLOADED
--------------------------------------------------------------*/
.it-how-long-ago-the-video-was-uploaded {
float: right !important;
margin-left: 4px !important;
color: var(--yt-spec-text-secondary) !important;}
color: var(--yt-spec-text-secondary) !important;
}
/*--------------------------------------------------------------
# SHOW CHANNEL VIDEOS COUNT
--------------------------------------------------------------*/
.it-channel-videos-count {
display: inline-block !important;
margin-left: 4px !important;
color: var(--yt-spec-text-secondary) !important;}
color: var(--yt-spec-text-secondary) !important;
}
10 changes: 0 additions & 10 deletions js&css/extension/www.youtube.com/appearance/details/details.js

This file was deleted.

Loading

0 comments on commit 9328c06

Please sign in to comment.