Git Product home page Git Product logo

invidious-redirect's People

Contributors

alamantus avatar metiis avatar sseneca avatar vkmi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

invidious-redirect's Issues

bug/feature request: remembering history

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

No redirect for youtube-nocookie.com

Try with any privacy-friendly embed YT video: https://www.youtube-nocookie.com/embed/...

There is code for YT-nocookie.com

else if (newloc.includes("youtube-nocookie")){
newloc=newloc.replace("youtube-nocookie.com/", "invidio.us/");
}

but nothing in the manifest
"content_scripts": [
{
"matches": ["*://*.youtube.com/*"],
"run_at": "document_start",
"js": ["makehook.js"]
}
]

Probably same for youtu.be.

Toolbar button?

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?

Rewrite links

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!

Fails to Install on Icecat

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"
      }
  },

Redirect embed to full-fledged

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 do I

How make my personal site of Invidious becasue I would like to

Consider webRequest.onBeforeRequest instead of window.location

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

manifest.json
"permissions": {
  "*://*.youtube.com/*",
  "*://*.youtube-nocookie.com/*",
  "*://*.youtu.be/*,
  "webRequest",
  "webRequestBlocking"
},
"background": {
  "scripts": ["background.js"]
}
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"]
);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.