Skip to content

Instantly share code, notes, and snippets.

@chrisjlee
Created November 9, 2015 20:30
Show Gist options
  • Save chrisjlee/f495840504499fe742f8 to your computer and use it in GitHub Desktop.
Save chrisjlee/f495840504499fe742f8 to your computer and use it in GitHub Desktop.
open chrome on windows
/*
* @TODO figure out why web security isn't working
*/
open = function (url, options) {
var uri = 'http://localhost:' + CONFIG.PORT + '/tms.html',
tempDir = 'C:/temp-chrome-eng';
var args = [
'--user-data-dir=' + tempDir,
'--no-default-browser-check',
'--no-first-run',
'--disable-default-apps',
'--start-maximized',
url || uri
];
var cmd = 'C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe';
var chrome = spawn(cmd, args);
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment