From e9ab3d3926e4703fcc9c3f3a931e2e5d624e97bb Mon Sep 17 00:00:00 2001 From: Riyyi Date: Fri, 28 Aug 2020 00:00:12 +0200 Subject: [PATCH] Move youtube cleanup to usercontent.css --- .mozilla/firefox/README.org | 19 +------ .../dotfiles.profile/chrome/userContent.css | 50 ++++++++++++++++--- 2 files changed, 45 insertions(+), 24 deletions(-) diff --git a/.mozilla/firefox/README.org b/.mozilla/firefox/README.org index 0b7e9ea..c599659 100644 --- a/.mozilla/firefox/README.org +++ b/.mozilla/firefox/README.org @@ -63,27 +63,10 @@ Tree Style Tab style rules. * Ublock Origin Filters -Cleanup YouTube page by disabling the following elements. +Block YouTube video player loading #+BEGIN_SRC css -! Youtube video player ||googlevideo.com -www.youtube.com###player-theater-container -! Video suggestions -www.youtube.com###secondary -! Homepage recommendations -www.youtube.com##.ytd-rich-grid-renderer.style-scope -www.youtube.com###card.ytd-miniplayer.style-scope -! YouTube Sidebar -www.youtube.com###guide-content -www.youtube.com###guide-icon.ytd-masthead -www.youtube.com##ytd-mini-guide-renderer.ytd-app -! Topright Buttons (except settings) -www.youtube.com###buttons.ytd-masthead > .ytd-masthead:not(:nth-child(3)) -! Video buttons (like, share, etc) -www.youtube.com###menu-container.ytd-video-primary-info-renderer -www.youtube.com###subscribe-button.ytd-video-secondary-info-renderer -www.youtube.com##ytd-comments-header-renderer > #simple-box #+END_SRC * User Scripts diff --git a/.mozilla/firefox/dotfiles.profile/chrome/userContent.css b/.mozilla/firefox/dotfiles.profile/chrome/userContent.css index b07cd24..a700d37 100644 --- a/.mozilla/firefox/dotfiles.profile/chrome/userContent.css +++ b/.mozilla/firefox/dotfiles.profile/chrome/userContent.css @@ -64,8 +64,14 @@ } @-moz-document domain("youtube.com") { - /* Hide video player */ - #player-theater-container { + /* Center content */ + #columns { + max-width: 65% !important; + min-width: 65% !important; + } + + /* Hide video player (small and theater size) */ + #player, #player-theater-container { display: none !important; } @@ -74,9 +80,41 @@ display: none !important; } - /* Center content */ - #columns { - max-width: 65% !important; - min-width: 65% !important; + /* Hide homepage recommendations */ + ytd-rich-grid-renderer { + display: none !important; + } + + /* Hide buttons in the top-right */ + #masthead #end #buttons > :not(:nth-child(3)) { + display: none !important; + } + + /* Hide sidebar guide and its icon */ + #guide-content, #guide-icon { + display: none !important; + } + + /* Hide collapsed sidebar guide */ + ytd-mini-guide-renderer { + display: none !important; + } + + /* Hide miniplayer */ + ytd-miniplayer { + display: none !important; + } + + /* Hide video buttons (like, share, etc) */ + #menu-container.ytd-video-primary-info-renderer + { display: none !important; } + #subscribe-button.ytd-video-secondary-info-renderer + { display: none !important; } + ytd-comments-header-renderer > #simple-box + { display: none !important; } + + /* Move first comment up a bit */ + #comments > #sections > #contents > :first-child { + margin-top: -30px; } }