I kept opening YouTube for one specific video and losing time to the home feed, but I still use search, video pages and subscriptions, so a full block was too much. This redirects only youtube.com/ to a URL you choose and leaves everything else alone.
Implementation notes:
- Manifest V3, no build step, no dependencies, no analytics.
- A content script runs at document_start and only acts when the path is exactly "/", so the feed is redirected via location.replace() before it renders.
- It also re-checks on YouTube's yt-navigate-finish event, so in-app navigation back to the homepage (e.g. clicking the logo) is caught too.
- It skips the redirect when the target equals the current URL to avoid loops.
- Permissions are limited to storage (to save the chosen URL in chrome.storage.sync) and host access to www.youtube.com. Nothing leaves the browser.
Feedback welcome, especially on YouTube navigation edge cases I might be missing.
rogulia•1h ago
Implementation notes: - Manifest V3, no build step, no dependencies, no analytics. - A content script runs at document_start and only acts when the path is exactly "/", so the feed is redirected via location.replace() before it renders. - It also re-checks on YouTube's yt-navigate-finish event, so in-app navigation back to the homepage (e.g. clicking the logo) is caught too. - It skips the redirect when the target equals the current URL to avoid loops. - Permissions are limited to storage (to save the chosen URL in chrome.storage.sync) and host access to www.youtube.com. Nothing leaves the browser.
Feedback welcome, especially on YouTube navigation edge cases I might be missing.