From 8f82e16bfacc6daec15d161ba9c5c2dd3a6a0c02 Mon Sep 17 00:00:00 2001 From: jzq <1310565255@qq.com> Date: Tue, 5 Nov 2024 13:28:24 +0800 Subject: [PATCH] Add Hide Top Progress Bar Function In Appearance Player --- .../www.youtube.com/appearance/player/player.css | 10 ++++++++++ js&css/web-accessible/www.youtube.com/appearance.js | 9 +++++++++ menu/skeleton-parts/appearance.js | 9 ++++++++- 3 files changed, 27 insertions(+), 1 deletion(-) diff --git a/js&css/extension/www.youtube.com/appearance/player/player.css b/js&css/extension/www.youtube.com/appearance/player/player.css index 30ba7826f..f270bf7c3 100644 --- a/js&css/extension/www.youtube.com/appearance/player/player.css +++ b/js&css/extension/www.youtube.com/appearance/player/player.css @@ -610,3 +610,13 @@ html[data-page-type=video][it-remove-black-bars=true] ytd-watch-flexy[fullscreen left: 0px!important; object-fit: cover; } + +/*-------------------------------------------------------------- +# HIDE TOP Progress BAR +--------------------------------------------------------------*/ + +html[data-page-type=video][it-hide-top-loading-bar=true] #progress.style-scope.yt-page-navigation-progress, +html[data-page-type=video][it-hide-top-loading-bar=true] .ytp-load-progress, +html[data-page-type=video][it-hide-top-loading-bar=true] .ytp-loading-bar { + display: none !important; +} diff --git a/js&css/web-accessible/www.youtube.com/appearance.js b/js&css/web-accessible/www.youtube.com/appearance.js index d57bbd525..e92dae4bb 100644 --- a/js&css/web-accessible/www.youtube.com/appearance.js +++ b/js&css/web-accessible/www.youtube.com/appearance.js @@ -320,6 +320,15 @@ ImprovedTube.commentsSidebar = function () { if (ImprovedTube.storage.comments_s }; } } +/*------------------------------------------------------------------------------ + HIDE TOP PROGRESS BAR +------------------------------------------------------------------------------*/ +ImprovedTube.hideTopProgressBar = function () { + var progressBar = document.querySelector(".top-progress-bar"); + if (progressBar) { + progressBar.style.display = "none"; + } +}; } /*------------------------------------------------------------------------------ SIDEBAR diff --git a/menu/skeleton-parts/appearance.js b/menu/skeleton-parts/appearance.js index 7e812ba16..20163a217 100644 --- a/menu/skeleton-parts/appearance.js +++ b/menu/skeleton-parts/appearance.js @@ -405,9 +405,16 @@ extension.skeleton.main.layers.section.appearance.on.click.player = { component: "switch", text: "hideScrollForDetails", tags: "remove,hide" - } + }, + hide_top_loading_bar: { + component: "switch", + text: "hideTopLoadingBar", + tags: "remove,hide" + }, } } + + }; /*--------------------------------------------------------------