add option to always open new tabs in target window - #2
Conversation
|
@lexelby This was exactly what I was looking for as well! I failed to find any extensions that did this, and found this one to be closest, and your addition is exactly what I'm looking for. My use case is using two Chrome windows side by side, and I always want new tabs opened in window 1 to appear in window 2 instead. However, it does not work when opening new tabs using middle mouse button, presumably because this does not use target = _blank in the same fashion. Do you think there's any way to add support to catch these events as well? |
|
Yay, I'm glad I'm not the only person with this use case! To be honest, this is where my knowledge of extension writing is very limited. I wonder if it might be possible to detect a middle click here: https://github.com/jfsl/open-in-specific-window/pull/2/files#diff-5ff5f030a93d13a9c0db8531ad0ad322R17 I use a TamperMonkey script in tandem with this extension. It forces the target to Still doesn't solve your middle-click problem though. |
|
Thanks for the response and the tip! I've never done any extension writing, but I'll see what I can do. Catching middle clicks is a bit hit and miss from my experience, but I recently made a TamperMonkey script that has managed to work pretty well so far, so I'll see if I can put this puzzle together. I'll let you know if I make any progress :) |
Recent versions of Chrome have nerfed the "open as app" functionality. Previously one could invoke Chrome from the command line like this:
It would open the url in a popup window without the address bar or tab bar. Importantly, any links in the appified window that target
_blankwill open a tab in the main window rather than in the appified window.I guess they're getting rid of that functionality or something? Now links just sort of open in the appified window, confusing the browser.
This extension was really close to what I wanted, so I added an option to open all new tabs in the main browser window (not just when alt-clicking). I also added the ability to skip specifying a target name, in which case the lowest-number window ID will be used (in my case, the main browser window).
I'm totally new to extension development, so please let me know if I've missed anything :)