Last active
November 14, 2024 22:38
-
-
Save nfiniteset/53d48bbc3f1769e0e6f2ea8f7e709739 to your computer and use it in GitHub Desktop.
Finicky config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
defaultBrowser: "Safari", | |
options: { | |
// Hide the finicky icon from the top bar. Default: false | |
hideIcon: true, | |
}, | |
rewrite: [ | |
{ | |
// Redirect all urls to use https | |
match: ({ url }) => url.protocol === "http", | |
url: { protocol: "https" } | |
}, | |
{ | |
match: ({ url }) => url.host.includes("zoom.us") && url.pathname.includes("/j/"), | |
url({ url }) { | |
try { | |
var pass = '&pwd=' + url.search.match(/pwd=(\w*)/)[1]; | |
} catch { | |
var pass = "" | |
} | |
var conf = 'confno=' + url.pathname.match(/\/j\/(\d+)/)[1]; | |
return { | |
search: conf + pass, | |
pathname: '/join', | |
protocol: "zoommtg" | |
} | |
} | |
}, | |
{ | |
match: function({ url }) { | |
// Open links to Asana, but not when downloading a file | |
return finicky.matchHostnames(["app.asana.com"]) && !url.pathname.includes('/app/asana/-/get_asset'); | |
}, | |
// match: finicky.matchHostnames(["app.asana.com"]), | |
url({ url }) { | |
return { | |
protocol: "asanadesktop", | |
host: "/app", | |
pathname: url.pathname | |
} | |
}, | |
} | |
], | |
handlers: [ | |
{ | |
// match: /^asanadesktop:\/\/\/app.*$/, | |
match: /^asanadesktop:\/\/\/app(?!\/asana\/-\/get_asset).*$/, | |
browser: "Asana" | |
}, | |
{ | |
match: /zoom\.us\/join/, | |
browser: "us.zoom.xos" | |
}, | |
{ | |
match: ["https://www.figma.com/file/*", "https://www.figma.com/board/*", "https://www.figma.com/design/*", "https://click.figma.com/*"], | |
browser: "Figma", | |
}, | |
] | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment