This is a Firefox port of the chrome extension
This is a small simple extension that tries to open any open.spotify.com or play.spotify.com url in the Spotify desktop client and then close the newly opened browser window.
The way the extension works is:
- If the URL visited is open.spotify.com or play.spotify.com then
- Don't do anything if the URL contains any of the following, else
/embed/
: Embedded playlists/embed?
: Legacy embed playlist format/log/
: Requests to Spotify's analytics
- Remove the protocol and domain part together with the first slash and
- Replace those with
spotify:
and - Replace the remaining slashes (
/
) with colons (:
) and - Redirect to that URL and
- Close the tab that opened the URL if it was a newly opened tab
Available in the Google Chrome web store and Firefox AMO
- Workaround for closing newly opened tab before the new external protocol
confirmation prompt introduced in v84 can be answered. You can set
security.external_protocol_requires_permission
tofalse
in about:config to stop the confirmation prompt from showing
- Purely a technical implementation release, switched from using webpack, in the unreleased 1.4, to relying on native ES6 modules in the extension.
- Don't touch analytics/log links and legacy embed links. Thanks @claui for the PR.
- Don't touch embedded links, so that websites that embed a playlist can do so without having Spotify trying to open the link automatically. Thanks @shape55 for reporting the issue.
- Opens links to user's playlists properly. Thanks for the bug report Robin H.
window by IconfactoryTeam from the Noun Project spotify logo from page source in www.spotify.com