Skip to content

frederic-klein/teams-pwa-link-redirect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Why?

The native Microsoft Teams application for Linux is not well maintained, so we switched to the Teams PWA in Google Chrome, which works rather well. We still want to use firefox as our default browser without maintaining active login sessions in multiple browsers. Clicking links in teams therefor becomes a bit annoying.

How does it work?

This little experiment introduces two new schemes for (ftl and ftls for firefox teams links) and an browser extension for chrome (works for edge as well). Clicked links in the Teams PWA are opened in Chrome and the extension modifies https to flts and http to flt, which causes Chrome to prompt for approval to open the FTL Handler. The FTL Handler is defined by the firefox-ftl.desktop file, which reverts the http/https replacement and opens the links in firefox.

Installation

  1. clone this repo git clone git@github.com:frederic-klein/teams-pwa-link-redirect.git
  2. make the firefox-ftl.desktop file available in your system: sudo cp ubuntu/firefox-ftl.desktop /usr/share/applications/
  3. install the chrome extension
    1. open chrome
    2. go to chrome://extensions/
    3. enable developer mode
    4. select Load unpacked
    5. select the cloned repo folder
    6. reopen the teams pwa or ctrl+f5
  4. associate the schemes with the desktop file:
xdg-mime default firefox-ftl.desktop x-scheme-handler/ftl
xdg-mime default firefox-ftl.desktop x-scheme-handler/ftls

Bypassing the Open FTL Handler Prompts

Chrome may display an "Open FTL Handler" prompt, which can only be permanently accepted per-domain.

You can define a policy to accept the custom protocol using the following command based on https://superuser.com/a/1588146

chrome

sudo bash
mkdir -p /etc/opt/chrome/policies/{managed,recommended}
cat <<EOF >/etc/opt/chrome/policies/managed/allow_ftl_protocol.json
{
  "URLWhitelist": [
    "ftl:*", "ftls:*",
  ],
  "URLAllowlist": [
    "ftl:*", "ftls:*",
  ]
}
EOF

chromium

sudo bash
mkdir -p /etc/chromium/policies/{managed,recommended}
cat <<EOF >/etc/chromium/policies/managed/allow_ftl_protocol.json
{
  "URLWhitelist": [
    "ftl:*", "ftls:*",
  ],
  "URLAllowlist": [
    "ftl:*", "ftls:*",
  ]
}
EOF

edge

sudo bash
mkdir -p /etc/opt/edge/policies/{managed,recommended}
cat <<EOF >/etc/opt/edge/policies/managed/allow_ftl_protocol.json
{
  "URLWhitelist": [
    "ftl:*", "ftls:*",
  ],
  "URLAllowlist": [
    "ftl:*", "ftls:*",
  ]
}
EOF

Contributors

Thanks to the following contributors for improving this helper ♡

About

open all links in firefox while using chrome

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published