From 76a23d6c17b57624c223b25d18d5106e18e154bf Mon Sep 17 00:00:00 2001 From: Marvin Date: Mon, 25 Nov 2024 15:16:04 -0500 Subject: [PATCH] Added feature to remove context buttons from youtube shorts. --- _locales/en/messages.json | 3 +++ js&css/extension/www.youtube.com/general/general.css | 7 ++++++- menu/skeleton-parts/general.js | 4 ++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 095a87606..8292dbb2f 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -1220,6 +1220,9 @@ "subtitleLine": { "message": "Hide subtitle red line" }, + "removeContextButtons": { + "message": "Remove context buttons on shorts" + }, "RemoveSubtitlesForLyrics": { "message": "Remove subtitles for lyrics" }, diff --git a/js&css/extension/www.youtube.com/general/general.css b/js&css/extension/www.youtube.com/general/general.css index 05be4bf74..4361a65a2 100644 --- a/js&css/extension/www.youtube.com/general/general.css +++ b/js&css/extension/www.youtube.com/general/general.css @@ -278,7 +278,12 @@ html[it-scroll-to-top='true'] #it-scroll-to-top:hover { html[it-remove-member-only='true'] ytd-grid-video-renderer:has(.badge-style-type-members-only) { display: none !important; } - +/*-------------------------------------------------------------- +# REMOVE CONTEXT BUTTONS ON SHORTS +--------------------------------------------------------------*/ +html[it-remove-context-buttons='true'] yt-shorts-suggested-action-view-model.YtShortsSuggestedActionViewModelStaticHost { + display: none !important; +} /*-------------------------------------------------------------- # Popup Window Button --------------------------------------------------------------*/ diff --git a/menu/skeleton-parts/general.js b/menu/skeleton-parts/general.js index 0622f9e65..1fcd58e4a 100644 --- a/menu/skeleton-parts/general.js +++ b/menu/skeleton-parts/general.js @@ -396,6 +396,10 @@ extension.skeleton.main.layers.section.general = { component: 'switch', text: 'removeMemberOnly', }, + remove_context_buttons: { + component: 'switch', + text: 'removeContextButtons', + }, } } },