Guest User

REDIRECT YAHOO NEWS TO GOOGLE NEWS TAMPERMONKEY CODE

a guest
Oct 22nd, 2014
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name           Yahoo News Redirector
  3. // @version        1.0
  4. // @description    Custom URL Redirects.
  5. // @match          https://www.yahoo.com/*
  6. // @match          http://www.yahoo.com/*
  7. // @match          https://news.yahoo.com/*
  8. // @match          http://news.yahoo.com/*
  9. // @run-at         document-start
  10. // @namespace   9561dd6022dc8fab28c840cacf9be85a
  11. // @icon        https://monkeyguts.com/icon/93.png
  12. // ==/UserScript==
  13.  
  14. redirectToPage("https://news.yahoo.com", "https://news.google.com");
  15. redirectToPage("http://news.yahoo.com", "https://news.google.com/");
  16. redirectToPage("https://www.yahoo.com", "https://news.google.com");
  17. redirectToPage("http://www.yahoo.com", "https://news.google.com");
  18.  
  19. function redirectToPage(page1, page2){
  20. if(window.location.href.indexOf(page1) != -1){
  21.     window.location.href = page2;
  22. }
  23. }
Add Comment
Please, Sign In to add comment