A macro to
close all tabs on the LEFT side of the current tab, or
close all tabs on the RIGHT side.
Works in all K-Versions since KM1.5.4
Note: if you have session restore-on-demand enabled (=default), read below.
MENU:
- Right-click on a tab,
- or Right-click on the Close button,
- or menu FILE => Close all LEFT/RIGHT Tabs (if toolbar "Menu" is enabled)
That File menu is quite cluttered, if you want the menu ONLY on the tab bar, open the kmm-file and look for "userconfig"
As easy as such a simple action should be, it was a major struggle again to find workarounds around several grave macro bugs, existing since at least KM1.6.
Macrolanguage is in dire need of some bugfixes and updates since 2011 :-(
And more probs appear with new features, like this one:
What happens if a user has session restore "on demand" enabled?
Many macros must loop from tab to tab to do anything, usually just checking their URL.
But merely touching those un-loaded tabs by macro already triggers them to load the web now, and there's no way to avoid it.
(feature since KM74, default since KM75, pref "browser.sessionstore.restore_on_demand = true")
Can't test myself what that means exactly for this "closing" macro, perhaps anyone else can do it?
INSTALLATION: copy the attached kmm-file into a macros folder (global one, or create it manually in profile)
Uninstall: delete the kmm file again