Invidious Redirect

Redirects Youtube URLs to Invidio.us

目前为 2018-09-02 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @description Redirects Youtube URLs to Invidio.us
  3. // @name Invidious Redirect
  4. // @namespace Backend
  5. // @include http://www.youtube.com/*
  6. // @include https://www.youtube.com/*
  7. // @version 1.1
  8. // @run-at document-start
  9. // @grant none
  10. // ==/UserScript==
  11. var a = 0;
  12. setInterval(function () {
  13. if (a === 0 && window.location.href.indexOf('watch?') > -1 && window.location.href.indexOf('list=WL') < 0) {
  14. a = '//invidio.us/watch?' + window.parent.location.href.split('?')[1];
  15. window.location.replace(a);
  16. }
  17. }, 10);