Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Reverse mode ON = links opened in tabs not redirected #93

Open
chaoscreater opened this issue Feb 7, 2024 · 1 comment
Open

Bug: Reverse mode ON = links opened in tabs not redirected #93

chaoscreater opened this issue Feb 7, 2024 · 1 comment

Comments

@chaoscreater
Copy link

When reverse mode is off, any URLs that you define in the comma separated URL list will be redirected to the target browser, regardless if you click on a link, or you paste the link into a new tab. This is great, because no matter how you open the link via whatever method, it gets redirected.

However, when reverse mode is on, any link that's not in the exception URL list should be redirected no matter how they are opened. The problem is that they only redirect when you click on the link. If you paste the link into a new tab, it'll stay open in source browser. Furthermore, not all links are redirected even when you click on them (they're not in the exception list). Some links in Outlook Office365 will stay open in the source browser, even when they are clicked on.

@chaoscreater
Copy link
Author

chaoscreater commented Feb 7, 2024

I'm using a workaround that I've created with Autohotkey. Thought I'd share it here in case it helps someone.

It doesn't matter what "Open In XYZ" extension you're using. Just configure it to not use reverse mode and set the URL pattern to target everything, like this:

image

image

For the .exe, I've included the source code and compiled exe in the zip:
Browser_Redirect.zip

The script is a bit complex, as I'm using it to do deep-linking into Teams web app chat messages etc. You can ignore that part.

The important bit is to look at how certain domains like (login.microsoftonline.com) is ignored. Even though Open In extension will redirect the URL to the browser (in my case the exe that I compiled from my AHK script), but the script isn't doing anything for login.microsoftonline.com, which means that it will still be processed on the source browser. This is important because if the source browser is primarily used for e.g. Teams web or Outlook web, then they need to login properly, instead of redirecting the login page to the target browser.

Essentially, I'm using Open In as a default blacklist mode for everything and only whitelisting certain URLs in my AHK script. By using this, all URLs, including the ones that you load into a new tab without clicking, will redirect. If you use reverse mode, then this behaviour is different and it's not what I want.

This works great for now, but ideally there should be a dedicated whitelist/blacklist mode depending on whether you have reverse mode enabled or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant