Skip to content

Instantly share code, notes, and snippets.

@b1naryzer0
Created December 17, 2023 21:53
Show Gist options
  • Select an option

  • Save b1naryzer0/5dc5b375455f4f02ecbfb03fe2a23693 to your computer and use it in GitHub Desktop.

Select an option

Save b1naryzer0/5dc5b375455f4f02ecbfb03fe2a23693 to your computer and use it in GitHub Desktop.
yt2inv
// ==UserScript==
// @name YouTubeRedirector
// @namespace https://github.com/b1naryzer0/YTRedir/edit/main/ytredir.user.js
// @version 0.32
// @description redirects from YouTube to Invidious
// @author b1naryzer0
// @match *://*.youtube.com/*
// @exclude *://*.reddit.com/*
// @exclude https://www.reddit.com/*
// @run-at document-start
// @grant none
// ==/UserScript==
(function() {
'use strict';
var newDomain="invidious.nerdvpn.de";
var newURL=location.protocol + "//"
+ newDomain
+ location.pathname
+ location.search
+ location.hash
+ "&autoplay=0"
;
location.replace (newURL);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment