This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The bookmarklet does a couple things: | |
// If the current page in the browser is a YouTube page, it will open that video in `invidious.xyz` | |
// If the current page in the browser is _not_ a YouTube page, it will open the `invidious.xyz` homepage | |
// | |
// To use: Copy/Paste the code below into the bookmark's address: | |
javascript:location.hostname.includes("youtube.com")?location.assign("https://invidious.xyz"+location.pathname+location.search+location.hash):location.assign("https://invidious.xyz"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:var a="https://vid.puffyan.us";if(location.hostname==="www.youtube.com"){location.assign(a+location.pathname+location.search);}else if(location.hostname==="youtu.be"){location.assign(a+location.pathname+location.search);}else if(location.hostname==="www.youtube-nocookie.com"){location.assign(a+location.pathname+location.search);}else{alert("not on youtube");} |