Open ssokolow opened 6 years ago
Sadly it is very hard because WebExtensions API doesn't provide ability to know what is the exact trigger of a new tab. By the commit b8b6077 I've added ability to set exceptions for tabs opened from pinned and unpinned tabs, but currently it is impossible to set such exceptions for other detailed cases.
Then how does Tree Style Tab tell whether something is a child? I was just proposing this:
about:...
pages, ignore it, since this is almost certainly something opened by a browser UI element which has a separate copy for each window. (eg. The New Tab button, the Add-ons or Preferences entries in the hamburger menu, etc.)OK, I've added support for more type exceptions. There is a development build which is triable via "about:debugging": https://piro.sakura.ne.jp/xul/xpi/nightly/aggregate-tabs-to-main-window.xpi
I've got it installed (I'm on Developer Edition with extension signing disabled. I just clicked the link, OKed through as normal, and then went through the extra step of manually clicking "Enable".) but it's still behaving the same way as the release version.
How do I enable the new type exceptions?
Exceptions are configurable via the "preferences" page of the addon.
I guessed that much, but the only likely candidates are the fields which are revealed when "Debug mode" is selected and they're not intuitive enough for me to know how to change them to get the desired effect without explanatory documentation.
This is what I get, after removing and re-installing the extension to be certain I'm not looking at an old version:
Hmm, sorry it is my fault. The nighly build is not updated as I expected. Anyway, I've released a new version 1.3.0 and you'll see more options in the configuration page. For example, uncheck all checkboxes under "Tabs to be aggregated" except "All other cases" then tabs only from non-existing tab (like tabs from external apps) will be moved automatically.
It's closer, but not perfect. If I do as you describe, the "New Tab" button and the Add-ons and Preferences menu entries still get aggregated.
If I do this, the "New Tab" button and Add-ons and Preferences menu entries don't get moved, but neither do the links I open from Thunderbird.
No matter what I try, the tab opened by clicking the "2 reviews" in the addon page still results in the tab being moved.
I've configured this addon exact same to the screenshot, and I got expected results - about:preferences, about:support, and about:addons are opened in a not largest window and stay there. Hmm...
Could you try logging? When the "Debug mode" checkbox is turned on, detailed logs will appear in the debugger's console for this addon. (You'll open the debugger console from about:debugging.)
The problem is that, when configured as shown in the screenshot, enabling the "Don't aggregate if it is matched to the regular expression" portion blocks the "Any other case" from working.
Steps to Reproduce:
firefox http://github.com/
in a terminal window.Expected:
about:*
pages (New Tab, Addons, Preferences) should remain in the window where the button or menu item was clicked.Actual behaviour:
about:*
pages (New Tab, Addons, Preferences) remain in the window where the button or menu item was clicked.Today was distracting and It's late now so, if you still need the logging output, I'll get that tomorrow.
Sorry for this 2 years delay...
Today I researched again deeply and I've realized that tabs from external applications are opened with "about:blank" URL at first. Such a tab matches to the regular expression for "don't aggregate" and remained unexpectedly. So I've introduced some changes to detect really requested URLs. With those changes, the case reported at the last comment works as expected for me now.
I have a triple-monitor Firefox setup like this...
...and it's very irritating when clicking a link in Thunderbird (or any other external application) causes one of my non-primary Firefox windows to change just because I interacted with it in a way which made Firefox think of it as "most recently used". (eg. starting a new YouTube video playing.)
Since my primary window is a bit bigger than the others I tried installing this extension as a way to force externally opened tabs to appear in the primary window. However, I ran into another problem: It's too aggressive.
If I middle-click a tab, this extension overrules Tree Style Tab and forces it to the centre window. If I open a new blank tab, it overrules my choice of which window's "New Tab" button I clicked and forces it to the centre window. If I use a browser-provided menu entry like Addons or Preferences which would normally open in whichever window I used the menu to open it from, it forces it to the centre window.
Would you mind adding an option to only aggregate tabs with no existing window affinity (ie. externally opened tabs) and ignore ones that either certainly or probably have a window affinity (eg. child tabs and tabs opening on
about:*
addresses likeabout:newtab
orabout:addons
, which would have been triggered by a menu entry or toolbar button)?