mirror of
https://github.com/lawrencehook/remove-youtube-suggestions.git
synced 2026-07-25 06:54:31 +00:00
Add an option to remove the clip button
This commit is contained in:
@@ -71,6 +71,7 @@ html[global_enable="true"][remove_info_cards="true"] .ytp-ce-element.ytp-ce-elem
|
||||
html[global_enable="true"][remove_vid_description="true"] ytd-watch-metadata #description,
|
||||
html[global_enable="true"][remove_menu_buttons="true"] #menu-container,
|
||||
html[global_enable="true"][remove_menu_buttons="true"] #actions,
|
||||
html[global_enable="true"][remove_clip_button="true"] #menu button[scissor_button],
|
||||
html[global_enable="true"][remove_video_likes="true"] like-button-view-model .yt-spec-button-shape-next__button-text-content,
|
||||
html[global_enable="true"][remove_channel_subscribers="true"] #owner-sub-count,
|
||||
html[global_enable="true"][remove_embedded_more_videos="true"] div.ytp-pause-overlay,
|
||||
|
||||
@@ -334,7 +334,8 @@ function runDynamicSettings() {
|
||||
const skipButtons = qsa('.ytp-ad-skip-button').
|
||||
concat(qsa('.ytp-ad-skip-button-modern')).
|
||||
concat(qsa('.ytp-skip-ad-button')).
|
||||
concat(qsa('#skip-button:2'));
|
||||
concat(qsa(CSS.escape("button#skip-button:2")));
|
||||
|
||||
const skippableAd = skipButtons?.some(button => button.offsetParent);
|
||||
if (skippableAd) {
|
||||
skipButtons?.forEach(e => {
|
||||
@@ -532,6 +533,12 @@ function runDynamicSettings() {
|
||||
}
|
||||
}
|
||||
|
||||
// Video Player: hide the 'clip' button.
|
||||
// The path[d=...] selector selects scissor SVGs.
|
||||
qsa('path[d^="M8 7c0 .55-.45 1-1 1s-1-.45-1-1"]').
|
||||
map(path => path.closest('#menu button')).
|
||||
forEach(b => b.setAttribute('scissor_button', ''));
|
||||
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
|
||||
+8
-12
@@ -281,22 +281,17 @@ const SECTIONS = [
|
||||
{
|
||||
name: "Hide the menu buttons - Like, Share, etc.",
|
||||
id: "remove_menu_buttons",
|
||||
defaultValue: false,
|
||||
effects: {
|
||||
true: {
|
||||
remove_video_likes: true
|
||||
}
|
||||
}
|
||||
defaultValue: false
|
||||
},
|
||||
{
|
||||
name: "Hide the clip button",
|
||||
id: "remove_clip_button",
|
||||
defaultValue: false
|
||||
},
|
||||
{
|
||||
name: "Hide the likes",
|
||||
id: "remove_video_likes",
|
||||
defaultValue: false,
|
||||
effects: {
|
||||
false: {
|
||||
remove_menu_buttons: false
|
||||
}
|
||||
}
|
||||
defaultValue: false
|
||||
},
|
||||
{
|
||||
name: "Hide channel subscribers count",
|
||||
@@ -692,6 +687,7 @@ const idToShortId = {
|
||||
"remove_channel_subscribers": '80',
|
||||
"grayscale_mode": '81',
|
||||
"lock_code": '82',
|
||||
"remove_clip_button": '83',
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user