Tree Style Tab, Show tabs like a tree.
This extension to Firefox provides the ability to work with tabs as "trees".
New tabs opened from the current tab are automatically organized as "children" of the current tab. Such "branches" are easily folded (collapsed) by clicking on the arrow shown in the "parent" tab, so you no longer need to suffer from too many visible tabs. If you want, you can restructure the tree via drag and drop.
Please enjoy as you like!
strict_min_version
information in the install manifest to know the minimum supported Firefox version.treestyletab-we.xpi.zip
manually to extract the XPI package file treestyletab-we.xpi
, otherwise you'll see an error about invalid manifest.Development builds are not signed, so you need to load them by an atypical method. (Please click this section to see instructions.)
There are two methods to try them in your environment:
about:debugging
and click "Load Temporary Add-on" button, then choose a XPI file. The development build will be loaded and active until you restart Firefox. Note: don't uninstall the remporarily installed dev build even if you finished a test, because uninstallation clears all configs of TST. Instead you just restart Firefox, then temporarily installed build are unloaded and the previously installed version will go back.about:config
and set xpinstall.signatures.required
to false
. Then you will be able to install such an unsigned XPI file.Also, you can build a custom development build locally. For example, here are the steps to build an XPI on Ubuntu (native, or WSL on Windows 10):
$ sudo apt install git nodejs npm jq zip
$ git clone --recursive https://github.com/piroor/treestyletab.git
$ cd treestyletab/webextensions
$ make
Steps to build a specific revision (for example bb467286d58b3da90fd1b2e6ee8a8016e3377b97):
$ cd treestyletab/webextensions
$ git checkout bb467286d58b3da90fd1b2e6ee8a8016e3377b97
$ git submodule update
$ make
Then you will see new .xpi
files in the current directory. You can install such a development build via about:debugging
. Click the Load Temporary Add-on
button and choose treestyletab/manifest.json
or a built .xpi
file.
TST provides an API for other extensions. Some extend the behavior of TST's sidebar panel. See also the list of known helper addons.
There are some similar project by someone not me providing similar features:
Some extensions provide a pop-up list of tabs with a search field that complements TST:
All feedback is handled as GitHub issues.
Please read FAQ below, before you post any new feature request.
browser.tabs.closeTabByDblclick
emulation, browser.tabs.selectOwnerOnClose
emulation, warnings for closing multiple tabs, style switch for leftside/rightside sidebar)Please remind that some existing features or options may violate this policy due to historical reasons.
Please use a forked version of TST for Pale Moon instead.
TST is designed for latest release of Mozilla Firefox (*Please see also the strict_min_version
information in the install manifest to know the minimum supported Firefox version), and other applications forked from Firefox are not supported.
"Waterfox Current" looks based on Firefox ESR68 and you can install TST 2.0 and later to it. However "Waterfox Classic" based on Firefox 56 is never supported.
TST can't be ported to other browsers because it depends on some Firefox specific APIs like sidebar
, so it needs to be re-implemented completely.
Sorry, but I won't re-implement TST as an extension for other browsers by myself because I use Firefox.
(But there are some alternatives developed by others.)
Currently I have no plan to add support for mobile devices (Android and iPhone) from some reasons:
As a workaround, you can create a userChrome.css
file.
But please remind that I - the original author of TST - never recommend such an usage, because TST doesn't cover full features of the native tabs due to restrictions of WebExtensions API so some tab features become inaccessible:
and I also believe that TST is not enough stable to replace Firefox's tab bar completely. Thus I usually use TST together with horizontal tab bar for safety.
If I hid the tab bar on my environment in my daily use, I might maintain the userChrome.css hack by myself, but actually I don't do that. So guidance to hide the tab bar need to be maintained by people who really use. I think it is a nightmare for regular people who don't know how to research and find out solutions with debugger. I intentionally don't describe details how to hide the horizontal tab bar, to save people from critical troubles.
I say again, I don't recommend you to hide the horizontal tab bar if you cannot write any suitable userChrome.css hack by yourself. I have no motivation to investigate how to hide the horizontal tab bar, because I'll never do that and it may lead people to troubles.
Due to restrictions within Firefox, TST can not apply GTK+ theme color to its appearance by default. If you want TST's UI with colors to match other parts of Firefox, you need to configure your environment, Firefox and TST as:
GTK_THEME
in your .profile
or somewhere like: export GTK_THEME=<Your theme name like Arc-Dark>
(I don't know why but CSS system colors on Firefox won't respect GTK's theme colors, if this environment variable is missing.)widget.content.allow-gtk-dark-theme
=true
(not default)
widget.content.gtk-theme-override
=unset (default)For more details, please see also the discussions in the issue #2667.
In short, there is a workaround:
For more detailed background, please see also my comment in the issue #2780.
Sadly there is no stable reference document due to unstableness of TST's DOM structure. The code snippets are just examples for the time they were written, and they may be broken by changes on TST itself, thus they need to be updated by users through investigation with the debugger.
It is not possible for Tree Style Tab to support horizontal tabs. TST 2.0 and later is implemented as a Firefox sidebar, there is no chance to provide a horizontal version of the extension.
This is beyond the scope of "Tree" Style Tab. There exist complementary extensions that can provide vertical tabs without a tree.
You can switch off this behavior:
autoAttach
checkbox.syncParentTabAndOpenerTab
checkbox.With those preferences unset, TST will no longer automatically attach new tabs to a tree.
To select multiple tabs, for drag-and-drop: Shift/Ctrl-click. Multiple Tab Handler has additional features.
Please see the list of helper extensions. For the appearance of tabs in the sidebar, custom user styles may help.
The variety of configurations for TST will not increase infinitely. Instead, I hope to reduce the variety. High customizability is out of scope. I want to limit options to those that are truly essential. Too many options would kill this project, because they would cloud the main concept of TST and would attract people who don't share my core vision.
Please see also the basic project policy
Available with TST 3.7.0 and later, as an expert option: "Tabs from any other trigger" under the "New Tabs Behavior" section. We cannot control the behavior for each detailed case, due to limitations of the WebExtensions API.
Please see the list of helper extensions. TST More Tree Commands's issue tracker may be a good place to track your request.
Please note that "useful" features won't be implemented to TST itself as a built-in feature. (There is another FAQ topic, please see it also.)
I believe that generally "tree of tabs should be a visualized history of web browsing", because they are built on relations where you came from. Possibly such a tree is facially chaotic, but it just mirrors your actual footmarks, so you'll easily find out where is the target tab based on a map in your mind. Moreover, those relations themselves may let you recall forgotten idea you thought while you were browsing those tabs.
On the other hand, sorted tabs based on URLs or something will be beautiful - but that's all. Such sorted tabs won't help me - I'm very forgetful. In other words, I just need something which memorizes my chaotic mind as-is.
By the way, my another addon Multiple Tab Handler will help you if you frequently modify tree by drag and drop. It provides ability to select multiple tabs by Ctrl-Click or Shift-Click and you can drag selected tabs at once.
There is a plan to implement an input field to write custom CSS rules, so it will work like as userChrome.css
.
See the code snippets and details of inspection for the sidebar contents.
TST should work well with any other session manager extension together, if it respects openerTabId
of tabs.Tab
.
Tab Session Manager (aka TSM) is one of examples.
(Moreover, TST also provides an API to open tabs with structure more safely.
TST and the session manager extension will work together more smoothly, if it opens tabs via the API.)
In other words, TST can't collaborate with any other extension if it does not give openerTabId
as a hint to construct trees.
On such cases it is required to improve the other collaborator extension itself.
Sadly it beyonds my power and needs a cooperation by the extension's author.
As a workaround, you can use TST's bookmarking feature to save trees of tabs. Select tabs (via Ctrl-click or Shift-click on tabs in the sidebar) and choose "Bookmark Tabs..." from the context menu, then TST creates a bookmark folder and bookmarks under the folder from selected tabs. After that please right-click on the bookmark folder and choose "Open All as a Tree", then you'll get tabs with restored tree structure.
TST should work well with any other session manager extension together, if it respects openerTabId
of tabs.Tab
.
Tab Session Manager (aka TSM) is one of examples.
(Moreover, TST also provides an API to open tabs with structure more safely.
TST and the session manager extension will work together more smoothly, if it opens tabs via the API.)
In other words, TST can't collaborate with any other extension if it does not give openerTabId
as a hint to construct trees.
On such cases it is required to improve the other collaborator extension itself.
Sadly it beyonds my power and needs a cooperation by the extension's author.
As a workaround, you can use TST's bookmarking feature to save trees of tabs. Select tabs (via Ctrl-click or Shift-click on tabs in the sidebar) and choose "Bookmark Tabs..." from the context menu, then TST creates a bookmark folder and bookmarks under the folder from selected tabs. After that please right-click on the bookmark folder and choose "Open All as a Tree", then you'll get tabs with restored tree structure.
A helper addon TST More Tree Commands provides a context menu command to create a new "group" from multiselected tabs.
If you hope to open a new "group (folder) tab" individually, preparing bookmark items to do that may become a solution, because a "group tab" is actually just an internal page with special URL. Such a "group tab" is actually implemented as a local page with internal URL of TST itself. Because of such internal pages have unique host part for each installation due to security reasons, TST provides special URI ext+treestyletab:group
as a stable alias across installations. For example:
Title | URL | What will happen |
---|---|---|
New Group | ext+treestyletab:group?title=New%20Group |
Creates a new permanent group tab (it won't be closed automatically by TST.) |
New Temporary Group | ext+treestyletab:group?title=New%20Temporary%20Group&temporary=true |
Creates a new temporary group tab. It will be closed automatically by TST when there is no child. |
New Quite Temporary Group | ext+treestyletab:group?title=New%20Temporary%20Group&temporaryAggressive=true |
Creates a new temporary group tab. It will be closed automatically by TST when there is only one child tab is left. |
There are some more URL options but they are quite internal and unstable. Instead it is recommended to create bookmarks from existing group tabs whici is opened with URL like moz-extension://xxxxx/resources/group-tab.html?...
, after you configure it with their UI (checkboxes and title input field.) TST automatically detects creation of bookmarks with such internal URLs and updates the saved URL to an alias prefixed with ext+treestyletab:group?
.
In short: shift-dragging of tabs will allow you to drop tabs to the bookmarks toolbar. Otherwise TST Bookmarks Subpanel possibly helps you.
From a change introduced at the bug 1453153 (affects on Firefox 63 and later), now Firefox doesn't allow extensions to provide ability to do "creating bookmarks (or links) by drag and drop of tabs" and "detach a tab to a new window by dropping it outside of the window" in same time - those functionailities are quite exclusive. (For more technical details, see my comment at the issue #2033.)
Thus, now TST provides two different effects to gestures:
You can switch these behaviors. Please go to the "Drag and Drop" section of TST's options page. (By the way, TST Bookmarks Subpanel's small Bookmarks panel always accept drag and drop of TST's tree without such modifier keys.)
For more preference, you can use a small drag handles with a helper addon: they will appear when the cursor is hovering on left edge (or right edge for inverted appearance) of a tab for a while. You can start dragging of the tab from one of handles, with specified effect for each without any modifier key.
TST should work well with any other extension together, if it respects openerTabId
of tabs.Tab
.
Tabs opened with the information will automatically organized as children of the opener tab, by TST.
In other words, TST can't collaborate with any other extension if it does not give openerTabId
as a hint to construct trees.
On such cases it is required to improve the other collaborator extension itself.
Sadly it beyonds my power and needs a cooperation by the extension's author.
This is a known issue and hard (or impossible) to be fixed on TST, due to restrictions of WebExtensions API.
TST cannot detect "a new blank tab is intentionally opened by the user with the keyboard shortcut Ctrl-T", because all new tabs are initially opened with the about:blank
URL even if you open a new tab from a link.
Sadly there is no more hint to detect the context how a new tab is opened by you.
For a workaround, you can define a custom shortcut to open a new blank tab with TST's settings: assigning something shortcut for the command "Open a new tab: Child Tab" at the add-ons manager.
Go to about:addons
=> click the gear button => "Manage Extension Shortcuts" => "Tree Style Tab" => "Show 40 More" => "Open a new tab: Child Tab" => set something shortcut like Ctrl+Alt+T, then you'll get a child tab as expected with the shortcut instead of the default Ctrl-T.
You need to change the TST's option New Tabs Behavior
=> Basic control for New Blank Tab
=> Guess a newly opened tab as opened by "New Blank Tab" action, when it is opened with the URL
to detect new tabs opened with any custom URL.
It is about:newtab
by default for Firefox's native new tabs.
Ctrl-Shift-K
, then type location.href
in the console. You'll see the actual URL of the new tab page like moz-extension://XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/dashboard.html
.
The UUID part is random due to security reasons.moz-extension://XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/html/newtab.html
, the UUID part can be found at about:debugging#/runtime/this-firefox
=> Extensions
=> New Tab Override
=> Internal UUID
.Such a problem may happen sometimes regardless I'm continuously struggling to solve them. Sadly on most cases there is no way to get back lost tree structure. (Sometimes, closing the window and restoring it via Ctrl-Shift-N may restore the window with correct tree structure, but it is effective only on very limited cases.) There are some workarounds to save your tree of tabs before you encounter such a situation:
>
marks in their title, it means their tree level. Right click on the bookmark folder and choose the command "Open All as a Tree", then TST will open tabs from the bookmark folder with tree structure constructed from the >
marks of their title.In short: it is unavoidable problem. You need to use the feature very carefully due to unavoidable restrictions.
To avoid those restrictions I always use both horizontal and vertical tab bars together. I ordinary use Firefox's native "Send Tab to Device" command instead of TST's one. This is one of reasons why I don't recommend to hide the horizontal tab bar.
Thanks, but sorry, I have no plans to accept any donations for these reasons:
Any other contribution to this project is welcome - translation, debugging, triaging of issues, and more. If you have fixed a bug you met, please send a pull request - I'll merge it. If you have different plans about TST, please fork this project freely for your purpose, if needed.
See the Notes for translators
This software does not collect any privacy data automatically, but this includes ability to synchronize options across multiple devices automatically via Firefox Sync. Any data you input to options, and URL of tabs you send to other devices may be sent to Mozilla's Sync server, if you configure Firefox to activate Firefox Sync.
このソフトウェアはいかなるプライバシー情報も自動的に収集しませんが、Firefox Syncを介して自動的に設定情報をデバイス間で同期する機能を含みます。 Firefox Syncを有効化している場合、設定画面に入力されたデータおよび他のデバイスに送信するよう指示したタブのURLは、Mozillaが運用するSyncサーバーに送信される場合があります。