add option to hide "Most relevant" section on subscriptions page

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Lawrence Hook
2026-03-15 17:13:15 -04:00
parent 4f6cd803b9
commit 26a514aa73
3 changed files with 22 additions and 1 deletions
+1
View File
@@ -126,6 +126,7 @@ html[global_enable="true"][remove_sub_upcoming="true"] ytd-rich-item-renderer[ba
html[global_enable="true"][remove_sub_premiere="true"] ytd-rich-item-renderer[badge-text="premiere"], html[global_enable="true"][remove_sub_premiere="true"] ytd-rich-item-renderer[badge-text="premiere"],
html[global_enable="true"][remove_sub_vods="true"] ytd-rich-item-renderer[is_vod], html[global_enable="true"][remove_sub_vods="true"] ytd-rich-item-renderer[is_vod],
html[global_enable="true"][remove_sub_most_relevant="true"] ytd-rich-section-renderer[is_most_relevant],
/* Other */ /* Other */
html[global_enable="true"][remove_notif_bell="true"] ytd-notification-topbar-button-renderer, html[global_enable="true"][remove_notif_bell="true"] ytd-notification-topbar-button-renderer,
+14 -1
View File
@@ -262,7 +262,8 @@ function runDynamicSettings() {
// Subscriptions page options (only if any sub-page settings are enabled) // Subscriptions page options (only if any sub-page settings are enabled)
const subsSettingsEnabled = cache['remove_sub_shorts'] || cache['remove_sub_live'] || const subsSettingsEnabled = cache['remove_sub_shorts'] || cache['remove_sub_live'] ||
cache['remove_sub_upcoming'] || cache['remove_sub_premiere'] || cache['remove_sub_vods']; cache['remove_sub_upcoming'] || cache['remove_sub_premiere'] || cache['remove_sub_vods'] ||
cache['remove_sub_most_relevant'];
if (onSubs && subsSettingsEnabled) { if (onSubs && subsSettingsEnabled) {
const badgeSelector = 'ytd-badge-supported-renderer'; const badgeSelector = 'ytd-badge-supported-renderer';
const upcomingBadgeSelector = 'ytd-thumbnail-overlay-time-status-renderer[overlay-style="UPCOMING"]'; const upcomingBadgeSelector = 'ytd-thumbnail-overlay-time-status-renderer[overlay-style="UPCOMING"]';
@@ -304,6 +305,18 @@ function runDynamicSettings() {
updatedGridVideo?.setAttribute('is_vod', ''); updatedGridVideo?.setAttribute('is_vod', '');
}); });
// "Most relevant" shelf
if (cache['remove_sub_most_relevant']) {
const shelves = qsa('ytd-rich-section-renderer ytd-rich-shelf-renderer');
shelves.forEach(shelf => {
const title = qs('span#title', shelf);
if (title?.innerText.trim().toLowerCase() === 'most relevant') {
const section = shelf.closest('ytd-rich-section-renderer');
section?.setAttribute('is_most_relevant', '');
}
});
}
// Reduce empty space. // Reduce empty space.
const subsRows = qsa('ytd-rich-grid-row'); const subsRows = qsa('ytd-rich-grid-row');
subsRows.forEach(row => { subsRows.forEach(row => {
+7
View File
@@ -521,6 +521,12 @@ const SECTIONS = [
defaultValue: false, defaultValue: false,
premium: true, premium: true,
}, },
{
name: "Hide \"Most relevant\" section",
id: "remove_sub_most_relevant",
defaultValue: false,
premium: true,
},
{ {
name: "Hide live videos", name: "Hide live videos",
id: "remove_sub_live", id: "remove_sub_live",
@@ -818,6 +824,7 @@ const idToShortId = {
"remove_results_description": '93', "remove_results_description": '93',
"enable_theater": '94', "enable_theater": '94',
"remove_playables": '95', "remove_playables": '95',
"remove_sub_most_relevant": '96',
}; };