Skip to content

Instantly share code, notes, and snippets.

@nickschot
Forked from pichfl/.finicky.js
Created June 29, 2020 16:29
Show Gist options
  • Save nickschot/1a592b1ece49b394081c0a5c7897d9ce to your computer and use it in GitHub Desktop.
Save nickschot/1a592b1ece49b394081c0a5c7897d9ce to your computer and use it in GitHub Desktop.
module.exports = {
defaultBrowser: 'Safari',
handlers: [
// Anything localhost should open in Opera
{
match: finicky.matchHostnames(['localhost']),
browser: 'Opera',
},
// Launch Google Meet on my first user account
{
match: finicky.matchHostnames(['meet.google.com']),
browser: 'Opera',
url({ url }) {
return {
...url,
search: 'authuser=0',
};
},
},
// Zoom.us
{
match: /zoom.us\/j\//,
browser: 'us.zoom.xos',
},
// Microsoft Teams
{
match: finicky.matchHostnames(['teams.microsoft.com']),
browser: 'com.microsoft.teams',
url({ url }) {
return {
...url,
protocol: 'msteams',
};
},
},
// Screens.so
{
match: finicky.matchHostnames(['screen.so']),
browser: 'so.screen.screen.app',
url({ url }) {
return {
hash: '',
host: 'join',
password: '',
pathname: '',
protocol: 'screen',
search: 'roomId=' + url.hash.match(/\d{3}-\d{3}-\d{3}/),
username: '',
};
},
},
// VSCode Liveshare
{
match: finicky.matchHostnames(['prod.liveshare.vsengsaas.visualstudio.com']),
browser: 'com.microsoft.VSCode',
url({ url, urlString }) {
return {
hash: '',
host: 'ms-vsliveshare.vsliveshare',
password: '',
pathname: 'join',
protocol: 'vscode',
search: 'vslsLink=' + encodeURIComponent(urlString) + '&correlationId=null',
username: '',
};
},
},
],
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment