mirror of
https://github.com/lawrencehook/remove-youtube-suggestions.git
synced 2026-07-25 06:54:31 +00:00
Also auto-select Homepage section in options when on YouTube homepage. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -57,6 +57,7 @@ html[global_enable="true"][remove_all_but_one="true"] ytd-browse[page-subtype="h
|
||||
html[global_enable="true"][remove_all_but_one="true"] ytd-browse[page-subtype="home"] ytd-rich-grid-renderer > #contents > ytd-continuation-item-renderer,
|
||||
html[global_enable="true"][remove_extra_rows="true"] ytd-browse[page-subtype="home"] ytd-rich-grid-renderer > #contents > ytd-rich-grid-row + ytd-rich-section-renderer,
|
||||
html[global_enable="true"][remove_infinite_scroll="true"] ytd-browse[page-subtype="home"] ytd-rich-grid-renderer > #contents > ytd-continuation-item-renderer,
|
||||
html[global_enable="true"][remove_playables="true"] *[is_playable],
|
||||
|
||||
/* Video Player - UX */
|
||||
html[global_enable="true"][disable_fullscreen_scroll="true"] ytd-watch-flexy[fullscreen] div#columns,
|
||||
|
||||
@@ -183,6 +183,15 @@ function runDynamicSettings() {
|
||||
});
|
||||
}
|
||||
|
||||
// Hide playables
|
||||
if (cache['remove_playables']) {
|
||||
const playableCards = qsa('ytd-mini-game-card-view-model');
|
||||
playableCards?.forEach(card => {
|
||||
const shelfContainer = card.closest('ytd-rich-section-renderer');
|
||||
shelfContainer?.setAttribute('is_playable', '');
|
||||
});
|
||||
}
|
||||
|
||||
// Channel page option
|
||||
if (onChannel) {
|
||||
if (cache['remove_channel_for_you']) {
|
||||
|
||||
@@ -152,6 +152,8 @@ function populateOptions(SECTIONS, headerSettings, SETTING_VALUES) {
|
||||
qs('.sidebar_section[tag="Subscriptions"]').click();
|
||||
} else if (channelRegex.test(currentUrl)) {
|
||||
qs('.sidebar_section[tag="Channel"]').click();
|
||||
} else if (homepageRegex.test(currentUrl)) {
|
||||
qs('.sidebar_section[tag="Homepage"]').click();
|
||||
} else {
|
||||
qs('.sidebar_section[tag="Basic"]').click();
|
||||
}
|
||||
|
||||
@@ -105,6 +105,11 @@ const SECTIONS = [
|
||||
id: "remove_infinite_scroll",
|
||||
defaultValue: false
|
||||
},
|
||||
{
|
||||
name: "Hide Playables",
|
||||
id: "remove_playables",
|
||||
defaultValue: false
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -741,6 +746,7 @@ const idToShortId = {
|
||||
"log_prompt_answered": '92',
|
||||
"remove_results_description": '93',
|
||||
"enable_theater": '94',
|
||||
"remove_playables": '95',
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user