YouTube redirect

Redirect YouTube url to my fullscreen version.

  1. // ==UserScript==
  2. // @name YouTube redirect
  3. // @version 1.0.5
  4. // @description Redirect YouTube url to my fullscreen version.
  5. // @include https://*youtube.com/*
  6. // @include http://*youtube.com/*
  7. // @namespace https://greasyfork.org/users/3159
  8. // @run-at document-start
  9. // ==/UserScript==
  10. var a = 0;
  11. setInterval(function () {
  12. if (a === 0 && window.location.href.indexOf('watch?') > -1 && window.location.href.indexOf('list=WL') < 0 && document.referrer.indexOf('github.io') < 0) {
  13. a = '//yukip.github.io/YouTube/?' + window.parent.location.href.split('?')[1];
  14. window.location.replace(a);
  15. }
  16. }, 10);