您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Opens spotify links in the desktop app
当前为
// ==UserScript== // @name Open in Spotify Desktop client // @description Opens spotify links in the desktop app // @version 0.2 // @author yungsamd17 // @namespace https://github.com/yungsamd17/UserScripts // @license MIT License // @icon https://www.google.com/s2/favicons?sz=64&domain=spotify.com // @match https://open.spotify.com/* // @run-at document-start // @noframes // ==/UserScript== (function() { 'use strict'; var data=document.URL.match(/[\/\&](track|playlist|album|artist|show|episode)\/([^\&\#\/\?]+)/i); console.log("This is a "+data[1]+" with id:"+data[2]+"\nAttempting to redirect"); window.location.replace('spotify:'+data[1]+':'+data[2]); setTimeout(function() { console.log("Closing tab"); window.close(); }, 100); })();