Advertisement
gavin19

Youtube links change

Sep 3rd, 2011
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name           Youtube link changer
  3. // @namespace      null
  4. // @description    Changes Youtube links.
  5. // @match          http://*
  6. // @match          https://*
  7. // @include        http://*
  8. // @include        https://*
  9. // @version    1.0
  10. // ==/UserScript==
  11.  
  12.  function init() {
  13.     var a = document.querySelectorAll('a');
  14.     for(var i=0,len=a.length;i<=len-1;i++){
  15.           a[i].href = a[i].href.replace('youtube.com/watch?v=','youtube.com/v/');
  16.     };
  17.  };
  18.  
  19. init();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement