-
Notifications
You must be signed in to change notification settings - Fork 0
/
.finicky.js
52 lines (52 loc) · 1.42 KB
/
.finicky.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
42
43
44
45
46
47
48
49
50
51
52
module.exports = {
defaultBrowser: "Firefox",
options: {
// Hide the finicky icon from the top bar. Default: false
hideIcon: false,
// Check for update on startup. Default: true
checkForUpdate: true,
},
rewrite: [
// {
// // Redirect all urls to use https
// match: ({ url }) => url.protocol === "http",
// url: { protocol: "https" },
// },
{
// rewrite http[s]://chime.aws/<meetingID> to chime://meeting?pin=meetingId>
match: finicky.matchHostnames(["chime.aws"]),
url: ({ url }) => ({
...url,
host: "",
search: "pin=" + url.pathname.substr(1),
pathname: "meeting",
protocol: "chime",
}),
},
// {
// // rewrite http[s]://quip.com/<documentID>/* to quip://<documentID>
// match: finicky.matchHostnames(["quip-amazon.com"]),
// url: ({ url }) => ({
// ...url,
// host: "",
// search: "",
// pathname:
// url.pathname.split("/")[1] == "email"
// ? decodeURIComponent(url.search).split("/")[2].split("&")[0]
// : url.pathname.split("/")[1],
// protocol: "quip",
// }),
// },
],
handlers: [
{
// open chime: url in Chime.app
match: ({ url }) => url.protocol === "chime",
browser: "Amazon Chime.app",
},
{
match: ({ url }) => url.protocol === "quip",
browser: "/Applications/Quip.app",
},
],
};