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.5k stars 153 forks source link

Temporarily disable a redirect #320

Open harryray33 opened 2 years ago

harryray33 commented 2 years ago

Is there a way of temporarily disabling a redirect without disabling redirector completely?

Gitoffthelawn commented 2 years ago

Yes. Please open the Redirector options, click on Edit Redirects, and then click Disable for any specific redirects you desire to disable.

harryray33 commented 2 years ago

Thanks for your reply..I know about disabling it from the options, but I was wondering if there was a way of disabling a redirect on the fly. Sometimes I just want to see the original site quickly before redirecting it without having to go to options, disabling the redirect then enabling again.

Also, when I have logging enable, where are the logs kept?

Thanks.

Gitoffthelawn commented 2 years ago

Hi Harry,

You're welcome. Outside of the options, there currently is no way to temporary disable a specific redirect rule. I'm trying to think of way to do this, given that a user can have hundreds of redirect rules. Any ideas?

Regarding the logs, they are output in real-time to the browser's console. In Firefox, you can press Ctrl+Shift+J to quickly access the browser console.

harryray33 commented 2 years ago

Thanks, I've been scratching my head over this, but can't think of a way...

endolith commented 1 year ago

Sometimes I wish I could right-click a link and click "Open without redirect" without having to disable Redirector and remember to re-enable it later.

harryray33 commented 1 year ago

Yes, same here....

pbarquei commented 1 year ago

Any chance holding a specific key (e.g. Shift) while clicking a link could disable the redirect rule (just for that link and that click)? Similar to the "open link in a new tab" (hold Ctrl and click link).

Gitoffthelawn commented 1 year ago

Any chance holding a specific key (e.g. Shift) while clicking a link could disable the redirect rule (just for that link and that click)? Similar to the "open link in a new tab" (hold Ctrl and click link).

That's a great idea 👍🏾 , but (some/most/all?) web browsers already have actions for shift+click, alt+click, ctrl+click defined. Now maybe something like shift+alt+click could be possible... I'm not sure at the moment.

endolith commented 1 year ago

How about the right-click and context menu option? I don't really care which method it is, but I would like at least one.

harryray33 commented 1 year ago

Sound like good methods if they can be implemented. I find the inability to temporarily disable a redirect easily the only thing lacking in an otherwise really good and useful extension.

Gitoffthelawn commented 1 year ago

It's very good to learn that this is a desirable feature.

I personally find this new knowledge fascinating because it's not a feature I would likely use personally (but I'm, of course, just one person), In the very rare situation when I need to test something because I think a redirect may be causing an issue, I quickly disable Redirector, perform the test, and then re-enable Redirector.

I'm guessing you all have more frequent situations when you want to temporarily disable a specific Redirector rule. Would you mind giving some examples of those situations?

harryray33 commented 1 year ago

For me, normally it's for film sites or downloading from Youtube etc. I normally redirect to a downloader site, but on some occasions, this doesn't work, and I need to look at the main site. A way to temporarily disable a particular redirect would be very useful, time saving and less frustrating.

I have to say again that this is a great extension, it's a real time saver.

pbarquei commented 1 year ago

One situation is: take, for example, a hyperlink on a word ("PowerShell") which I would, normally, want it to take me to search for a project on github (https://github.com/search?q=PowerShell). However, if I know the project already exists, I simply want it to take me to the project (https://github.com/PowerShell). So I would define the redirect from https://github.com/ to https://github.com/search?q= but, for example, clicking on the "hotkey" would disable the redirect.

Hope that helps.

Oh, and btw, thanks for the great job you have done with this extension.

Hardcore-fs commented 1 year ago

Maybe make it like "bit defender" anti virus. you can disable with a timer, so for example with a key combo, you could pop open a window to turn of redirection for a listed site for say.. 10 minutes or 5 minutes or whatever.

Gitoffthelawn commented 1 year ago

@harryray33 Thank you for the examples you provided. They are helpful.

@pbarquei Thank you, also, for the examples. They are helpful as well. Regarding your thanks for the great job on the extension, Your thanks is appreciated, and I want to gratefully point out that the overwhelming majority of the thanks humbly goes to Einar Egilsson.

@Hardcore-fs I think that's an interesting idea too. My concern with it is that one might forget that they are in "Redirectorless" mode; thus, I like the "per-click" suggestions more. Plus, implementation and UI should be simpler for the "per-click" ideas. That said, I think your idea has quite a bit of merit too.

Is anyone interested in writing the code for either method to temporarily disable a redirect? If so, I can work towards getting it integrated, tested, and then released.

endolith commented 1 year ago

you can disable with a timer, so for example with a key combo

I don't like that method as well, it's not much different from disabling Redirector and then enabling it again. Ideally this would be a 1-click quick solution for one link at a time.

And my usage: I have certain URLs redirect to a resolver that takes me directly to the original document, but occasionally it doesn't exist, so I want to override it and go to the unredirected URL, where I can then look for a better solution. Right-click and "Open without Redirector" would be perfect. Holding a button and clicking would be almost as good. Disabling Redirector altogether and then forgetting to reenable it later is more work and hassle.

harryray33 commented 1 year ago

Another reason for me to temp disable a redirect, is that the majority of times the download site I redirect to shows me the file size and full name of the file I'm downloading. Occasionally, when the download site doesn't show the file size info or the full file name, I like to look at the original site for the info.

If I have to do this several times it can be a bit tedious and time consuming, and, as mentioned above, I often forget to re-enable.

I like the idea of somehow temporarily disabling a particular redirect via the context menu, or maybe with a single button to toggle on or off, but presumably this would affect all redirects.

Even if a single toggle affected all redirects, it would still be preferable.