Spotify open in app

This userscript redirects open.spotify.com links to the desktop app

< 脚本 Spotify open in app 的反馈

评价:好评 - 脚本运行良好

§
发布于:2020-07-31

Updated script to include support for highlight in the URL.


(function() {
  'use strict';
  var url = new URL(document.URL);
  var uri;

  if (url.searchParams.get("highlight") === null) {
    data = url.pathname.match(/(track|playlist|album|artist|show|episode)\/([^\&\#\/\?]+)/i);
    uri = 'spotify:'+data[1]+':'+data[2];
  } else {
    uri = url.searchParams.get("highlight")
  }

  console.log("Redirecting to " + uri);
  window.location.replace(uri);
  window.close();
})();

发布留言

登录(不可用)以发布留言。

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址