Skip to content

Instantly share code, notes, and snippets.

@mattdesl
Created October 29, 2019 04:13
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattdesl/7659793f9373e314aa97455d316700c2 to your computer and use it in GitHub Desktop.
Save mattdesl/7659793f9373e314aa97455d316700c2 to your computer and use it in GitHub Desktop.

quick start

  • Copy launch.js into your local/offline project folder
  • Within terminal, run npm install open in the project folder
  • Then quit all Chrome tabs/windwos/apps etc and run node launch.js from the project folder

It should launch in full screen mode.

custom flags

If the above doesn't work, you can try adding the flags yourself depending on the browser:

https://www.chromium.org/developers/how-tos/run-chromium-with-flags

Exmple:

/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --kiosk

const open = require("open");
// Open chrome with some additional flags
open("http://localhost:5000", {
app: [
"google chrome",
"--autoplay-policy=no-user-gesture-required",
"--kiosk" // optional, runs in fullscreen
]
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment