Add option to hide Most relevant section#223
Add option to hide Most relevant section#223lscarneiro wants to merge 5 commits intoOsaSoft:masterfrom
Conversation
- Add "settings.hide.most.relevant" to DEFAULT_SETTINGS in common.js - Add corresponding test configuration in tests/setup.js - Add hideMostRelevant to loadVideo context in tests/helpers/load-source.js Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add hideMostRelevant global variable in subs.js - Load setting value in initSubs() function - Enhance shelf processing in subs-ui.js to detect and hide "Most relevant" section when setting is enabled - Preserve existing behavior of hiding empty shelves Note: Title matching is hardcoded to English "Most relevant" text. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add checkbox toggle in Subscriptions Feed settings section - Include accessible aria labels and descriptions - Position after "Hide Shorts" setting for logical grouping Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Instead of checking for hardcoded English text, detect the shelf by structural characteristics: algorithmic recommendation shelves have both #avatar and #icon elements hidden, unlike channel-specific shelves which display the channel avatar. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
haha yeah, it sometimes does that 😅 |
There was a problem hiding this comment.
Pull request overview
This pull request adds a new setting to hide the algorithmic "Most relevant" recommendation shelf from the YouTube subscriptions feed, following the established pattern for hiding other content types (Shorts, Premieres, Lives, Members-only).
Changes:
- Added
settings.hide.most.relevantsetting with default valuefalse - Implemented language-independent detection of algorithmic recommendation shelves based on DOM structure (hidden avatar and icon elements)
- Added settings UI toggle with appropriate ARIA labels for accessibility
- Updated test configuration to include the new setting
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| common.js | Added default setting definition for settings.hide.most.relevant |
| subs.js | Added initialization logic for hideMostRelevant variable |
| subs-ui.js | Implemented shelf detection and hiding logic with language-independent DOM checks |
| pages/settings/settings.html | Added UI toggle for the new setting with accessibility attributes |
| tests/setup.js | Added test constant for the new setting |
| tests/helpers/load-source.js | Exposed hideMostRelevant in test context |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Move settings.hide.most.relevant between shorts and lives to match the visual ordering in the settings page. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
Hey @OsaSoft, would you mind taking another look? I think you might not have seen the changes made after the review. Cheers! |
| } | ||
|
|
||
| // Hide algorithmic recommendation shelf if setting is enabled | ||
| // Detection: channel-specific shelves show an avatar, algorithmic shelves have both |
There was a problem hiding this comment.
in the screenshot of the algo shelf, i see the channel avatars, so is this true? Or this referring to some other element?
oh sh, sorry i had one more question, but left it pending without sending it |


Summary
Screenshots
Changes
settings.hide.most.relevanttoDEFAULT_SETTINGSTest plan
youtube.com/feed/subscriptionsnpm test- all tests pass🤖 Generated with Claude Code