Euphony is a Safari extension that converts artist, album, and song links between Spotify and Apple Music. Once enabled, it will automatically open Spotify links in Apple Music.
Please note, the "can read and alter sensitive information on webpages" is a bit misleading. Euphony is simply replacing the URL from one service with the URL to the other service.