mirror of
https://github.com/Llewellynvdm/nativefier.git
synced 2024-12-23 10:38:55 +00:00
Merge with upstream/development
This commit is contained in:
commit
f5d6980bfe
@ -117,7 +117,9 @@ function createMainWindow(options, onAppQuit, setDockBadge) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
createMenu(menuOptions);
|
createMenu(menuOptions);
|
||||||
initContextMenu(mainWindow);
|
if (!options.disableContextMenu) {
|
||||||
|
initContextMenu(mainWindow);
|
||||||
|
}
|
||||||
|
|
||||||
if (options.userAgent) {
|
if (options.userAgent) {
|
||||||
mainWindow.webContents.setUserAgent(options.userAgent);
|
mainWindow.webContents.setUserAgent(options.userAgent);
|
||||||
|
@ -44,7 +44,7 @@ function createMenu({nativefierVersion, appQuit, zoomIn, zoomOut, goBack, goForw
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Copy Current URL',
|
label: 'Copy Current URL',
|
||||||
accelerator: 'CmdOrCtrl+C',
|
accelerator: 'CmdOrCtrl+L',
|
||||||
click: () => {
|
click: () => {
|
||||||
const currentURL = getCurrentUrl();
|
const currentURL = getCurrentUrl();
|
||||||
clipboard.writeText(currentURL);
|
clipboard.writeText(currentURL);
|
||||||
|
@ -264,6 +264,14 @@ Disable window frame and controls
|
|||||||
|
|
||||||
Shows detailed logs in the console.
|
Shows detailed logs in the console.
|
||||||
|
|
||||||
|
#### [disable-context-menu]
|
||||||
|
|
||||||
|
```
|
||||||
|
--disable-context-menu
|
||||||
|
```
|
||||||
|
|
||||||
|
Disable the context menu
|
||||||
|
|
||||||
## Programmatic API
|
## Programmatic API
|
||||||
|
|
||||||
You can use the Nativefier programmatic API as well.
|
You can use the Nativefier programmatic API as well.
|
||||||
|
@ -107,7 +107,8 @@ function selectAppArgs(options) {
|
|||||||
flashPluginDir: options.flashPluginDir,
|
flashPluginDir: options.flashPluginDir,
|
||||||
fullScreen: options.fullScreen,
|
fullScreen: options.fullScreen,
|
||||||
hideWindowFrame: options.hideWindowFrame,
|
hideWindowFrame: options.hideWindowFrame,
|
||||||
maximize: options.maximize
|
maximize: options.maximize,
|
||||||
|
disableContextMenu: options.disableContextMenu
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,6 +43,7 @@ if (require.main === module) {
|
|||||||
.option('--maximize', 'if the app should always be started maximized')
|
.option('--maximize', 'if the app should always be started maximized')
|
||||||
.option('--hide-window-frame', 'disable window frame and controls')
|
.option('--hide-window-frame', 'disable window frame and controls')
|
||||||
.option('--verbose', 'if verbose logs should be displayed')
|
.option('--verbose', 'if verbose logs should be displayed')
|
||||||
|
.option('--disable-context-menu', 'disable the context menu')
|
||||||
.parse(process.argv);
|
.parse(process.argv);
|
||||||
|
|
||||||
if (!process.argv.slice(2).length) {
|
if (!process.argv.slice(2).length) {
|
||||||
|
@ -56,7 +56,8 @@ function optionsFactory(inpOptions, callback) {
|
|||||||
fullScreen: inpOptions.fullScreen || false,
|
fullScreen: inpOptions.fullScreen || false,
|
||||||
maximize: inpOptions.maximize || false,
|
maximize: inpOptions.maximize || false,
|
||||||
hideWindowFrame: inpOptions.hideWindowFrame,
|
hideWindowFrame: inpOptions.hideWindowFrame,
|
||||||
verbose: inpOptions.verbose
|
verbose: inpOptions.verbose,
|
||||||
|
disableContextMenu: inpOptions.disableContextMenu
|
||||||
};
|
};
|
||||||
|
|
||||||
if (options.verbose) {
|
if (options.verbose) {
|
||||||
|
Loading…
Reference in New Issue
Block a user