Advertisement
video_game

YouTube Redirector

Dec 6th, 2012
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name       YouTube Redirector
  3. // @namespace  http://vdoga.me/
  4. // @version    0.1
  5. // @description  Automatically redirects from the new, dumb YouTube homepage to the stuff you actually want to see.
  6. // @match      http://youtube.com/*
  7. // @match      http://*.youtube.com/*
  8. // @match      https://youtube.com/*
  9. // @match      https://*.youtube.com/*
  10. // ==/UserScript==
  11.  
  12. var url = "http://www.youtube.com/feed/subscriptions/u";
  13. var redirecturls = ["http://youtube.com/","http://www.youtube.com/","https://youtube.com/","https://www.youtube.com/"];
  14. if(redirecturls.indexOf(window.location)!=-1)
  15.     window.location = url;
  16. var links = document.links;
  17. for(i=0;i<links.length;i++)
  18.     if(redirecturls.indexOf(links[i].href)!=-1)
  19.         links[i].href=url;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement