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