Created
February 13, 2023 16:42
-
-
Save thepeopleseason/989a17adb9cade9d6fa922b22733778d to your computer and use it in GitHub Desktop.
This file contains hidden or 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
var intuit = { name: "Google Chrome", profile: "Profile 3" }; | |
var mailchimp = { name: "Google Chrome", profile: "Profile 2" }; | |
var debug = false; | |
module.exports = { | |
defaultBrowser: { | |
name: "Firefox", | |
}, | |
rewrite: [ | |
{ | |
match: (all) => { | |
if (debug) { finicky.log(JSON.stringify(all, null, 2)); } | |
return true; | |
}, // Execute rewrite on all incoming urls | |
url({ url }) { | |
// Remove all query parameters beginning with these strings | |
const removeKeysStartingWith = ["utm_", "uta_"]; | |
// Remove all query parameters matching these keys | |
const removeKeys = ["fbclid", "gclid"]; | |
const search = url.search | |
.split("&") | |
.map((parameter) => parameter.split("=")) | |
.filter(([key]) => !removeKeysStartingWith.some((startingWith) => | |
key.startsWith(startingWith))) | |
.filter(([key]) => !removeKeys.some((removeKey) => key === removeKey)); | |
return { | |
...url, | |
search: search.map((parameter) => parameter.join("=")).join("&"), | |
}; | |
}, | |
} | |
], | |
handlers: [ | |
{ | |
match: "open.spotify.com/*", | |
browser: "Spotify", | |
}, | |
// mailchimp | |
{ | |
match: ({ url }) => { | |
if (url.host.includes("rsglab") || | |
url.host.includes("mailchimp") || | |
url.host.includes("mcpeeps") || | |
url.pathname.includes("mailchimp") || | |
url.host.includes("meet.google.com") || | |
finicky.getKeys().command // Hold cmd to open links in the mailchimp browser | |
) { | |
if (debug) { finicky.log("mailchimp"); } | |
return true; | |
} | |
}, | |
browser: mailchimp, | |
}, | |
// intuit | |
{ | |
match: ({ url }) => { | |
if (url.host.includes("intuit") || | |
url.pathname.includes("intuit") || | |
url.host.endsWith("alight.com") || | |
url.host.endsWith("perksatwork.com") || | |
url.host.endsWith("degreed.com") || | |
url.host === "www.concursolutions.com" || | |
url.host === "align.ustream.tv" || | |
url.host === "outlook.office365.com" || | |
finicky.getKeys().shift // Hold shift to open links in the intuit browser | |
) { | |
if (debug) { finicky.log("intuit"); } | |
return true; | |
} | |
}, | |
browser: intuit, | |
}, | |
], | |
options: { | |
hideIcon: false, | |
checkForUpdate: true, | |
logRequests: debug, | |
urlShorteners: (list) => ["eepurl.com", "go.rsglab.com", "intuit.me"], | |
}, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment