-
Notifications
You must be signed in to change notification settings - Fork 0
/
dot_finicky.js.tmpl
45 lines (45 loc) · 1.09 KB
/
dot_finicky.js.tmpl
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
42
43
44
45
module.exports = {
defaultBrowser: "Firefox Developer Edition",
options: {
hideIcon: true,
},
handlers: [
{
match: ({ url }) => url.host.endsWith("google.com"),
browser: ({ url }) => {
const profile = (search) => {
try {
const authuser = search.match(/authuser=(.*)/)[1];
switch (authuser.slice(-5)) {
// ~/Library/Application Support/Google/Chrome/<Profile Name>
case "ad.jp":
return "Profile 1";
case "ts.jp":
return "Profile 3";
default:
return "Default";
}
} catch {
return "Default";
}
};
return {
name: "Google Chrome",
profile: profile(url.search),
};
},
},
{
match: ({ url }) =>
[
"figma.com",
"inspect.isar.dev",
"inspect.isar-community.dev",
"notion.so",
].some(
(host) => url.host.endsWith(host)
),
browser: "Google Chrome",
},
],
};