metiis / invidious-redirect Goto Github PK
View Code? Open in Web Editor NEWA (very) small WebExtension to redirect YouTube links to Invidious.
License: The Unlicense
A (very) small WebExtension to redirect YouTube links to Invidious.
License: The Unlicense
Please add the ability to change the invidious instance domain. For example someone wants to use anothers instance or his own private one.
Every video link I open redirects to the same video.
Please stop this practice. Adding it serves no purpose and is breaking many of the available invidious instances because they already use subdomains.
Example: invidious.snopyta.org
If you add a www. to it, it becomes www.invidious.snopyta.org and won't load because it's not an existing domain.
hi, thanks for this addon, brilliant.
I have 1 niggle: whenever i access a youtube page and your addon redirects it to Invidio.us, i can no longer press "back" any more in the browser, it's like the history is forgotten. So this is a request to A) either make it so that the history remains, or B) add the option that the redirect happens in a separate tab, so that the original tab goes to youtube, and i can press "back" on that tab
invidio.us will shut down on September 1st. See https://omar.yt/posts/stepping-away-from-open-source
Try with any privacy-friendly embed YT video: https://www.youtube-nocookie.com/embed/...
There is code for YT-nocookie.com
invidious-redirect/makehook.js
Lines 12 to 14 in 8660325
invidious-redirect/manifest.json
Lines 13 to 19 in 8660325
Probably same for youtu.be.
Using DDG's !yt bang, !yt foo
outputs https://www.invidio.us/results?search_query=dark%20series%20intro instead of https://www.invidio.us/search?q=foo
Would it be possible to add a button to the toolbar in future versions, so that the add-on can be quickly enabled or disabled?
Hi. Thank you for this great extension!
Just one thing I'd like to change: Every time I want to watch a video that someone links to it seems like I first have to go to YT before getting redirected to Invidious. Wouldn't it be possible to just rewrite the link before I click on it?
Thanks!
Add-on fails to install on Icecat. Says its corrupted. I found a workaround however, by adding this to the manifest.json:
"applications": {
"gecko": {
"id": "address@hidden"
}
},
Consider making it possible to redirect youtube.com/embed to full invidio.us instead of also /embed. This would make it more convenient if someone (like me) blocks scripts and can't play the embeded video directly on a website.
How make my personal site of Invidious becasue I would like to
Would be nice to have this extension on Firefox mobile too.
Currently requests to youtube will still hit their servers and only then the content script is loaded, which in turn redirects to invidious. Consider to instead register an onBeforeRequest listener, which can cancel the request to youtube and redirect to invidious.
Something along the lines of
"permissions": {
"*://*.youtube.com/*",
"*://*.youtube-nocookie.com/*",
"*://*.youtu.be/*,
"webRequest",
"webRequestBlocking"
},
"background": {
"scripts": ["background.js"]
}
browser.webRequest.onBeforeRequest.addListener(request => {
const url = new URL(request.url);
if (url.hostname.endsWith("youtube.com") || url.hostname.endsWith("youtube-nocookie.com")) {
const v = url.searchParams.get("v");
if (v) {
return {redirectUrl: `https://invidio.us/watch?v=${v}`};
}
const q = url.searchParams.get("q");
if (q) {
return {redirectUrl: `https://invidio.us/search?q=${q}`};
}
const searchQuery = url.searchParams.get("search_query");
if (searchQuery) {
return {redirectUrl: `https://invidio.us/search?q=${searchQuery}`};
}
if (url.pathname.startsWith("/channel/")) {
return {redirectUrl: `https://invidio.us${url.pathname}`};
}
}
if (url.hostname.endsWith("youtu.be")) {
return {redirectUrl: `https://invidio.us/watch?v=${url.pathname.replace("/", "")}`};
}
}, {
"urls": ["*://*.youtube.com/*", "*://*.youtube-nocookie.com/*", "*://*.youtu.be/*"],
"types": ["main_frame"]
},
["blocking"]
);
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.