-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
index.js
35 lines (25 loc) · 977 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
windows = require('./windows.js');
linux = require('./linux.js');
macos = require('./macos.js');
function getChromePath() {
return windows.getChrome() || linux.getChrome() || macos.getChrome() || null;
}
function getEdgePath() {
return windows.getEdge() || linux.getEdge() || macos.getEdge() || null;
}
function getThoriumPath() {
return windows.getThorium() || linux.getThorium() || macos.getThorium() || null;
}
function getChromiumPath() {
//If not found, fallbacks to another Chromium-based browser
//(only on linux there is a "real" chromium possible install path)
return windows.getChromium() || linux.getChromium() || macos.getChromium() || null;
}
function getFirefoxPath() {
return windows.getFirefox() || linux.getFirefox() || macos.getFirefox() || null;
}
function getSafariPath() {
//Only for mac
return macos.getSafari() || null;
}
module.exports = { getChromePath, getEdgePath, getThoriumPath, getChromiumPath, getFirefoxPath, getSafariPath };