You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
462 B
17 lines
462 B
const contextMenu = require('electron-context-menu');
|
|
|
|
const rightClickMenu = contextMenu({
|
|
append: (defaultActions, parameters, browserWindow) => [
|
|
{
|
|
label: 'Search DuckDuckGo for “{selection}”',
|
|
visible: parameters.selectionText.trim().length > 0,
|
|
click: () => {
|
|
shell.openExternal(`https://duckduckgo.com/?q=${encodeURIComponent(parameters.selectionText)}`);
|
|
}
|
|
}
|
|
],
|
|
showSearchWithGoogle: false
|
|
});
|
|
|
|
module.exports = rightClickMenu;
|