Skip to content

Instantly share code, notes, and snippets.

@riesentoaster
Last active April 8, 2022 11:04
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
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