From f7d7b9a0ea2404f1b61036dfd1db3af7c1a4dfe7 Mon Sep 17 00:00:00 2001 From: Oj Date: Thu, 8 Dec 2022 08:36:20 +0000 Subject: [PATCH] gluon: experimental edge support --- gluon/index.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gluon/index.js b/gluon/index.js index 493e97d..0adcc78 100644 --- a/gluon/index.js +++ b/gluon/index.js @@ -22,11 +22,16 @@ import CDP from 'chrome-remote-interface'; const findChromePath = () => { - const whichChrome = process.argv.includes('--canary') ? 'canary' : 'stable'; + let whichChrome = 'stable'; + + for (const x of [ 'canary', 'edge' ]) { + if (process.argv.includes('--' + x)) whichChrome = x; + } switch (whichChrome) { case 'stable': return join(process.env.PROGRAMFILES, 'Google', 'Chrome', 'Application', 'chrome.exe'); case 'canary': return join(process.env.LOCALAPPDATA, 'Google', 'Chrome SxS', 'Application', 'chrome.exe'); + case 'edge': return join(process.env['PROGRAMFILES(x86)'], 'Microsoft', 'Edge', 'Application', 'msedge.exe'); } };