mirror of
https://github.com/zadam/trilium.git
synced 2025-01-29 02:18:18 +08:00
choose only desired context menu items
This commit is contained in:
parent
ec4abe0d81
commit
b161db064e
1 changed files with 7 additions and 2 deletions
|
@ -25,7 +25,11 @@ let mainWindow;
|
|||
require('electron-dl')({ saveAs: true });
|
||||
|
||||
contextMenu({
|
||||
prepend: (defaultActions, params, browserWindow) => [
|
||||
menu: (actions, params, browserWindow) => [
|
||||
actions.cut(),
|
||||
actions.copy(),
|
||||
actions.copyLink(),
|
||||
actions.paste(),
|
||||
{
|
||||
label: 'Search DuckDuckGo for “{selection}”',
|
||||
// Only show it when right-clicking text
|
||||
|
@ -35,7 +39,8 @@ contextMenu({
|
|||
|
||||
shell.openExternal(`https://duckduckgo.com?q=${encodeURIComponent(params.selectionText)}`);
|
||||
}
|
||||
}
|
||||
},
|
||||
actions.inspect()
|
||||
]
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue