mirror of
https://github.com/Llewellynvdm/nativefier.git
synced 2024-12-22 18:18:55 +00:00
parent
8981e55783
commit
46d381481c
@ -89,6 +89,8 @@ function createMainWindow(inpOptions, onAppQuit, setDockBadge) {
|
||||
icon: getAppIcon(),
|
||||
// set to undefined and not false because explicitly setting to false will disable full screen
|
||||
fullscreen: options.fullScreen || undefined,
|
||||
// Whether the window should always stay on top of other windows. Default is false.
|
||||
alwaysOnTop: options.alwaysOnTop,
|
||||
});
|
||||
|
||||
mainWindowState.manage(mainWindow);
|
||||
|
11
docs/api.md
11
docs/api.md
@ -46,6 +46,7 @@
|
||||
- [[tray]](#tray)
|
||||
- [[basic-auth-username]](#basic-auth-username)
|
||||
- [[basic-auth-password]](#basic-auth-username)
|
||||
- [[always-on-top]](#always-on-top)
|
||||
- [Programmatic API](#programmatic-api)
|
||||
|
||||
## Command Line
|
||||
@ -489,6 +490,16 @@ Example:
|
||||
nativefier <your-website> --file-download-options '{"saveAs": true}'
|
||||
```
|
||||
|
||||
#### [always-on-top]
|
||||
|
||||
```
|
||||
--always-on-top
|
||||
```
|
||||
|
||||
Enable always on top for the packaged application.
|
||||
|
||||
|
||||
|
||||
## Programmatic API
|
||||
|
||||
You can use the Nativefier programmatic API as well.
|
||||
|
@ -52,6 +52,7 @@ function selectAppArgs(options) {
|
||||
tray: options.tray,
|
||||
basicAuthUsername: options.basicAuthUsername,
|
||||
basicAuthPassword: options.basicAuthPassword,
|
||||
alwaysOnTop: options.alwaysOnTop,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -89,6 +89,7 @@ if (require.main === module) {
|
||||
.option('--tray', 'allow app to stay in system tray')
|
||||
.option('--basic-auth-username <value>', 'basic http(s) auth username')
|
||||
.option('--basic-auth-password <value>', 'basic http(s) auth password')
|
||||
.option('--always-on-top', 'enable always on top window')
|
||||
.parse(process.argv);
|
||||
|
||||
if (!process.argv.slice(2).length) {
|
||||
|
@ -70,6 +70,7 @@ export default function (inpOptions) {
|
||||
tray: inpOptions.tray || false,
|
||||
basicAuthUsername: inpOptions.basicAuthUsername || null,
|
||||
basicAuthPassword: inpOptions.basicAuthPassword || null,
|
||||
alwaysOnTop: inpOptions.alwaysOnTop || false,
|
||||
};
|
||||
|
||||
if (options.verbose) {
|
||||
|
Loading…
Reference in New Issue
Block a user