From a1f3ba377d258bce389cdfdec6fa028860a83ded Mon Sep 17 00:00:00 2001 From: Marvin Date: Mon, 18 Nov 2024 12:55:14 -0500 Subject: [PATCH] Added functionality to remove the red line under the caption button with the use of a button in the main menu. --- _locales/en/messages.json | 3 +++ js&css/extension/www.youtube.com/appearance/player/player.css | 3 +++ menu/skeleton-parts/appearance.js | 4 ++++ 3 files changed, 10 insertions(+) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index e9f6ceaea..58297e70d 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -1214,6 +1214,9 @@ "subtitles": { "message": "Subtitles" }, + "subtitleLine": { + "message": "Hide subtitle red line" + }, "RemoveSubtitlesForLyrics": { "message": "Remove subtitles for lyrics" }, 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 d7c511e54..d1703a6b9 100644 --- a/js&css/extension/www.youtube.com/appearance/player/player.css +++ b/js&css/extension/www.youtube.com/appearance/player/player.css @@ -181,6 +181,9 @@ html[it-player-remote-button=true] .ytp-remote-button, html[it-player-chaptertitle-button=true] .ytp-chapter-container { display: none !important; } +html[it-player-subtitlesLine-button=true] button.ytp-subtitles-button.ytp-button::after{ + display: none; +} /*-------------------------------------------------------------- # HIDE ANNOTATIONS --------------------------------------------------------------*/ diff --git a/menu/skeleton-parts/appearance.js b/menu/skeleton-parts/appearance.js index b228f252a..ea767b3b5 100644 --- a/menu/skeleton-parts/appearance.js +++ b/menu/skeleton-parts/appearance.js @@ -282,6 +282,10 @@ extension.skeleton.main.layers.section.appearance.on.click.player = { component: "switch", text: "subtitles" }, + player_subtitlesLine_button: { + component: "switch", + text: "subtitleLine" + }, player_miniplayer_button: { component: "switch", text: "nativeMiniPlayer"