This userscript redirects open.spotify.com links to the desktop app
< 脚本 Spotify open in app 的反馈
A little refactor if you'd like :)
const [ , type, id ] = document.URL.match( /[\/\&](track|playlist|album|artist|show|episode)\/([^\&\#\/\?]+)/i ) window.location.replace( `spotify:${ type }:${ id }` ) // window.close()
登录以发布留言。
A little refactor if you'd like :)