HackerTrans
热门最新趋势评论往期问答秀出招聘

rogulia

1 声望加入于 4个月前

提交

[untitled]

1 分·作者 rogulia·6天前·0 评论

Show HN: Vatnode – EU VAT validation REST API with national registry fallback

vatnode.dev
4 分·作者 rogulia·上个月·0 评论

Show HN: A Chrome extension that redirects only the YouTube homepage

github.com
2 分·作者 rogulia·上个月·1 评论

[untitled]

1 分·作者 rogulia·上个月·0 评论

[untitled]

1 分·作者 rogulia·3个月前·0 评论

评论

rogulia
·上个月·讨论
[flagged]
rogulia
·上个月·讨论
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
·2个月前·讨论
[flagged]
rogulia
·2个月前·讨论
[flagged]