SimonBrazell / privacy-redirect

A simple web extension that redirects Twitter, YouTube, Instagram & Google Maps requests to privacy friendly alternatives.
GNU General Public License v3.0
2.01k stars 112 forks source link

Don't Redirect "View on ..." links #30

Closed matteqa closed 4 years ago

matteqa commented 4 years ago

When you click a View on YouTube link in Invidious it redirects back to invidious. It would be more useful if this actually went to YouTube as there is sometimes issues with some videos.

SimonBrazell commented 4 years ago

Hi @matteqa, yes I agree, this should work, I'll include this in the next build.

To fix this I can compare the initiator URL to the list of instances on the invidious repo and not redirect from these. But that means it won't work for any private or unlisted instances but I'm not sure how many of those there are anyway.

Jpxe commented 4 years ago

Wouldn't it be possible to compare the initiator URL to the instance variable set by the user to get private instances working?

SimonBrazell commented 4 years ago

@ToughGuyKunio yes that's a much better idea, I'll do that instead.

Thanks for the coffees btw mate, very much appreciated.

SimonBrazell commented 4 years ago

Please let me know if there are any problems with redirects in the latest version, this applies to Invidious, Nitter, and Bibliogram (OSM doesn't seem to have a similar feature).

Not released on Chrome yet as the previous release still hasn't been approved...

Jpxe commented 4 years ago

No view on youtube/twitter/instagram links work for me. Tested on both custom and standard instances.

matteqa commented 4 years ago

Same issue here, tried on Firefox 74 with v1.1.18 but didn't work for Invidious or Bibliogram (not sure what links to test on Nitter). Even with the custom variables set in the settings for the servers.

Servers tested:

invidio.us invidious.snopyta.org bibliogram.pussthecat.org

SimonBrazell commented 4 years ago

Hmm seems the behaviour is different on each browser... sorry I'll look into it.

matteqa commented 4 years ago

Also tried installing the ZIP in Brave but that gave an error (I assume because it's the Firefox build)

SimonBrazell commented 4 years ago

No problem I think I've found the issue, seems Firefox doesn't have the initiator value, funny I thought it would be compatible with Chrome, I'll find the alternative and fix this up with a new build.

@matteqa I haven't tested the plugin on Brave, in theory it should work but will need a CRX file to load, you can unzip the FF archive and then Load unpacked when in Developer mode.

matteqa commented 4 years ago

I unpacked the ZIP in the releases and added it in Developer mode but got this error:

Unrecognized manifest key 'browser_specific_settings'.

"browser_specific_settings": { "gecko": { "id": "{b7f9d2cd-d772-4302-8c3f-eb941af36f76}" } }

matteqa commented 4 years ago

Removing that line from the manifest.json made it install but the View as buttons still redirect

SimonBrazell commented 4 years ago

@matteqa that should just be a warning, I get the same error on stock chrome but it still installs:

Screen Shot 2020-03-31 at 4 57 59 pm

See how it's a yellow warning symbol vs the red error. If that isn't the case then perhaps Brave handles extensions a little differently to Chromium.

matteqa commented 4 years ago

For me it still was labelled as 1.1.16 in the extension until i removed the line. Odd that Brave handles it differently considering it's supposed to be standard Chromium underneath.

Jpxe commented 4 years ago

I've been using the build from Chrome Store in Brave for a good while and had no problems with it.

SimonBrazell commented 4 years ago

Must just be when trying to load unpacked extensions then, good to know.

I'm having issues with the Nitter 'View in Twitter' links, caused by another fix I added the other day that removes the Twitter service worker if present, it doesn't have access to the initiator like the background script does... Maybe I'll just push out the change for Invidious and Bibliogram for now?

matteqa commented 4 years ago

The Chrome store version is working for me fine. Just had trouble installing this new version manually because Brave seems to handle warnings as errors.

Also it turns out the reason the View As links weren't working for me on Brave was because I had two versions of the extension installed. My fault.

SimonBrazell commented 4 years ago

Oh cool, yeah it was working on Chromium for me, and I'm getting it working on Firefox now, I'll push up a new build shortly.

Thanks for your help!

SimonBrazell commented 4 years ago

One other problem I've found with the way it's different on Firefox - if you click the watch on YouTube link, and then refresh that page on Chrome it redirects the page to Invidious like it should, but on Firefox it stays on Youtube... not sure if that will be a problem.

SimonBrazell commented 4 years ago

Seems to work as expected if I copy the url to another tab though so at least the normal use cases aren't broken, so I think we are good to go, minus the Nitter links which I still need to work out.

matteqa commented 4 years ago

Either way could be seen as expected behavior so i wouldnt worry about it

SimonBrazell commented 4 years ago

Okay should be fixed now for Firefox in v1.1.19.

I've aborted the change for Nitter for now due to that other conflict I mentioned above.

SimonBrazell commented 4 years ago

Let me know how you go.

@matteqa another Aussie 🦘👋

matteqa commented 4 years ago

:wave:

matteqa commented 4 years ago

Looks all good on my end!

Thanks for developing this extension btw, it's really useful.

SimonBrazell commented 4 years ago

Awesome, I'll see if I can fix up the Nitter links in a future release!

No worries, it's a bit fun building and maintaining it, keeps me busy, especially lately when I'm stuck at home day and night!

Jpxe commented 4 years ago

Works for me too :+1:

SimonBrazell commented 4 years ago

Thanks guys.

DJCrashdummy commented 4 years ago

the "open in twitter"-links on nitter are still redirected (at least in firefox)... is still being worked on this (then wouldn't it be better to reopen & perhaps rename this issue) or won't this be fixed? or should a new issue be opened about this particular problem?

SimonBrazell commented 4 years ago

@DJCrashdummy yes you're right, this slipped my mind to be honest, I'll re-open this to help remind me in the future when I have more time to work on this project again.

SimonBrazell commented 4 years ago

Should be completed now with 'open in twitter' now working as expected in v1.1.32, due to go live on AMO shortly.