einaregilsson / Redirector

Browser extension (Firefox, Chrome, Opera, Edge) to redirect urls based on regex patterns, like a client side mod_rewrite.
http://einaregilsson.com/redirector/
MIT License
1.54k stars 162 forks source link

[bug] Unable to redirect from chrome-extension:// #251

Open sumsarz opened 3 years ago

sumsarz commented 3 years ago

It seems that you're unable to redirect from chrome-extension:// (and I assume similar non-http adresses like chrome:// etc.)

While the rule correctly parses chrome-extension://extensionID&uri=https://website.com -> https://website.com the redirection isn't performed when entered in the adress bar. When modifying the rule to not include "chrome-extension://" it works correctly.

I assume it's related to #178.

einaregilsson commented 3 years ago

Wait, so you can redirect away from a chrome-extension:// url if you just don't include that in the rule? Can you post a screenshot of the rule?

sumsarz commented 3 years ago

No, if I change it to something other than chrome-extension://, like hrome-extension:// (which isn't anything, really.) Basically anything that isn't an internal chrome page, error page or extension page seems to work.

I've been trying to figure out how to redirect from error pages, but I haven't found a way to do that with javascript as it's blocked for access (though it works when running it straight in the chrome console.)

I'm not an extension dev, so I don't know if you can do that with an extension with a certain permission instead.

einaregilsson commented 3 years ago

Ok, weird, I always thought everything except http and https wasn't passed through the extension. Not really working on this now, but will look into it at some point :)