-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
chrome.js
41 lines (35 loc) · 785 Bytes
/
chrome.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
36
37
38
39
40
41
const path = require("path");
exports.id = "chrome";
exports.name = "Google Chrome";
exports.keychain = {
service: "Chrome Safe Storage",
account: "Chrome",
};
exports.userDataDirectoryPath = () => {
let userDataDirectoryPath;
if (process.platform === "win32") {
userDataDirectoryPath = path.join(
process.env.LOCALAPPDATA,
"Google",
"Chrome",
"User Data"
);
}
if (process.platform === "darwin") {
userDataDirectoryPath = path.join(
process.env.HOME,
"Library",
"Application Support",
"Google",
"Chrome"
);
}
if (process.platform === "linux") {
userDataDirectoryPath = path.join(
process.env.HOME,
".config",
"google-chrome"
);
}
return userDataDirectoryPath;
};