Skip to content

Conversation

@AlexChulo
Copy link

@AlexChulo AlexChulo commented Oct 19, 2025

Add Categories refresh button to restore disappeared chip bar

Adds a "Categories" button that restores YouTube's category filter chips when they disappear from the home page.

  • If chip bar is hidden: Makes it visible again
  • If chip bar is present: Toggles categories for visual feedback
  • If chip bar is missing: Reloads the page to restore it

Trying to fix issue where user had to reload the page multiple times to get the category chips back.

Issue:
#3154

Untitled-video-Made-with-Clipchamp

Introduces a 'Refresh Categories' button to the menu and sidepanel, with supporting JavaScript to trigger a refresh of YouTube categories via content script messaging. Updates CSS for button styling and adds logic to reload the chip bar on YouTube when requested.
Simplifies and improves the refresh logic for YouTube categories by updating the content script and menu button behavior. Adds 'tabs' permission to manifest for messaging and tab reloads, and removes unnecessary reload and error handling from the refresh button click handler.
@ImprovedTube
Copy link
Member

ImprovedTube commented Oct 21, 2025

Thank you so much! @AlexChulo
This way the feature requires two clicks.
Instead, we usually have toggles to enable it automatically
and or allow to set key / shortcut
and or add a button on the YouTube page. Which doesn't necessarily require more maintenance since the youtube.com features depends selectors anyways like document.querySelector('ytd-feed-filter-chip-bar-renderer')

Hi @keulecgn (you can test it)

@AlexChulo
Copy link
Author

Thanks for the feedback, @ImprovedTube !
So if I understand correctly, you’d prefer having a refresh button directly on the YouTube page, along with a shortcut/hotkey?

@keulecgn doesn’t seem to be active at the moment — but would this solution work for you?

@AlexChulo
Copy link
Author

Hi @ImprovedTube,
I have a question - does the project have a coding standard? I couldn't find one in the repo or wiki.

@keulecgn
Copy link

@AlexChulo Hi ...
Man i would love it! And thank you for your great work in general!!!!

@AlexChulo
Copy link
Author

Hello @keulecgn,
Thanks for the reply and feedback, I will make the revision.

Introduces a new 'category refresh' button to the YouTube UI, allowing users to restore categories with a single click. The refresh logic is moved from the extension background to the content script for direct interaction. A keyboard shortcut for refreshing categories is also added. Menu and localization files are updated to support the new feature, and the obsolete refresh-categories menu part is removed.
A missing comma was added after the 'Fullscreen quality' entry in the English locale messages.json file to fix JSON formatting.
@AlexChulo
Copy link
Author

Hello @keulecgn & @ImprovedTube,
Thank you for the feedback! I've revised the implementation as requested.
What's included:

On-page button: A native-looking refresh button in the YouTube header (can be toggled on/off in General settings)
Keyboard shortcut: Customizable hotkey support in the Shortcuts section
Auto-restore: The button persists even when YouTube re-renders the header

Both methods will (same as before):

Restore hidden category chips if they're present but invisible
Reload the page if the chips are completely missing

Ready for review!

Ontwerp zonder titel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants