Skip to content

Instantly share code, notes, and snippets.

@riesentoaster
Last active April 8, 2022 11:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save riesentoaster/235f84394f045a4229aa0725ad7ffc3d to your computer and use it in GitHub Desktop.
Save riesentoaster/235f84394f045a4229aa0725ad7ffc3d to your computer and use it in GitHub Desktop.
redirects the youtube front-page to the subscription page
//if (new RegExp(["m.youtube.com/feed/explore/", "m.youtube.com"].map(e => "http(s?):\\/\\/"+e+"(\\/)?(\?.*)?").join("|")).test(location.href)) location.href="https://m.youtube.com/feed/subscriptions"
new MutationObserver(function(mutations) {
if (new RegExp(["m.youtube.com/feed/explore", "m.youtube.com", "www.youtube.com"].map(e => "(^http(s)?:\\/\\/"+e+"(\\/)?(\\?.*)?$)").join("|")).test(location.href)) location.href="https://m.youtube.com/feed/subscriptions"
}).observe(document, {subtree: true, childList: true});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment