CloseTabSiblings - an event based script to automatically close equal tabs already open, when opening new tabs or changing folders.
There's also a command "CloseTabSiblings" included, you can unregister the event and make use of the command only if you wish.
I made this because I often end up with multiple tabs showing the same folder.
Additionally I think I'm too lazy to look if a specific tab is already opened for the folder/tab I'm going to open next. o)
If the event is active (default is enabled - watch the script config), there's nothing more to do than making sure the script is enabled.
Whenever you open a new tab/folder, any pre-existing tab with the same folder opened on the same tab row, will be closed automatically.
If the event is not enabled, you can add the command "CloseTabSiblings" to the folder filetype events and run it after any "GO NEWTAB" command e.g.
You can also put the command on a dedicated button to close all tabs which have the same folder opened as the current tab.
Finetuning / Config:
You can add a blacklist of paths to never close, en/disable qualifiers or statically protect the first n-number of tabs in a row.
If qualifiers are enabled (default), pressing when opening or changing tabs or folders temporarily disables tab closing.
Pressing protects the tab itself and stops closing any tabs which show the same new path.
To install the event/command, download the *.js.txt file below and drag it to Preferences / Toolbars / Scripts.
After that the event/command shall be ready to use, just make sure the script is enabled (should be by default).
[ul][li]Latest: v0.2.2 - supports automatic updates/scriptwizard, detection of native tab-locks:
Event.Folder_CloseTabSiblings.js.txt (11.1 KB)
[li]v0.2 - supports various ways to finetune the auto-close behaviour:
Event.Folder_CloseTabSiblings.js.txt (10.3 KB)
[li]v0.1 - initial version:
Event.Folder_CloseTabSiblings.js.txt (5.42 KB)[/li][/ul]