middle click can now open links in new tab (and close tab)

This commit is contained in:
zadam
2019-05-15 21:50:27 +02:00
parent dd1fc23fe8
commit f22cc37df7
10 changed files with 1411 additions and 956 deletions

View File

@@ -372,11 +372,14 @@ $(tabRow.el).on('contextmenu', '.note-tab', e => {
contextMenuService.initContextMenu(e, {
getContextMenuItems: () => {
return [
{title: "Close all tabs", cmd: "removeAllTabs", uiIcon: "empty"},
{title: "Close all tabs except for this", cmd: "removeAllTabsExceptForThis", uiIcon: "empty"}
];
},
selectContextMenuItem: (e, cmd) => {
if (cmd === 'removeAllTabsExceptForThis') {
if (cmd === 'removeAllTabs') {
tabRow.removeAllTabs();
} else if (cmd === 'removeAllTabsExceptForThis') {
tabRow.removeAllTabsExceptForThis(tab[0]);
}
}