Treestyletab: Add option to hide "Close Tabs to the Top" menu item

Created on 9 Mar 2021  路  6Comments  路  Source: piroor/treestyletab

Via this commit was added menu item "Close Tabs to the &Top" (id context_closeTabsToTheStart), and it is located now in place where was the old "Close Tabs to the Bottom" item.

And now I always do the missclick and close tabs to the top, instead of bottom. And for me - the need of closing tabs to the top is very-very rare, so I even don't need this menu item.

I even try to hide this menu item via chrome/userChrome.css using:

#context_closeTabsToTheStart,
    { display:none !important; }

but this isn't work.

So, will be good to have option to hide this item, or change the order.

wontfix workaround exists

Most helpful comment

Me too, I'm afraid of removal of userChrome.css feature from Firefox. If it become unavailable in a future version of Firefox, I possibly add options to control simulated tab context menu commands to TST.

All 6 comments

What I do for removing items in userChrome.css:

/* MCI: Tree Style Tab - Menu item removal */
/* https://github.com/piroor/treestyletab/wiki/Code-snippets-for-custom-style-rules#hide-context-menu-items-in-the-sidebar-2116 */
/* Close Tabs to End */
*[id^="treestyletab_piro_sakura_ne_jp-menuitem-_context_closeTabsToTheEnd"],
/* Close Other Tabs */
*[id^="treestyletab_piro_sakura_ne_jp-menuitem-_context_closeOtherTabs"] {
  display: none;
}

@MurzNN As @irvinm commented you need to specify more complex selector to identify menu items implemented by TST.

Sorry but I have no plan to add options to control visibility of menu items simulating Firefox's native tab context menu, because Firefox itself doesn't provide such an option.

Thanks, your workaround works well! Glad to have also ability to move the last stayed one item from submenu to parent menu, but afraid that this isn't possible via css hacks :(
The parent menu is passed via js code here: https://github.com/piroor/treestyletab/blob/aaa3e93d5af2797009b682c2ce99a19bdf5b4f99/webextensions/background/tab-context-menu.js#L169-L172

Me too, I'm afraid of removal of userChrome.css feature from Firefox. If it become unavailable in a future version of Firefox, I possibly add options to control simulated tab context menu commands to TST.

@MurzNN or @piroor is there anything more to discuss on this item or can it be closed?

Let's close till Firefox still supports userChrome.css :)

Was this page helpful?
0 / 5 - 0 ratings