Always open spotify desktop app

Always open spotify links in the desktop app

// ==UserScript==
// @name        Always open spotify desktop app
// @namespace   Violentmonkey Scripts
// @match       https://open.spotify.com/*
// @grant       none
// @version     1.1
// @author      liliantdn
// @license MIT
// @description Always open spotify links in the desktop app
// ==/UserScript==
(function() {
  let a = location.href.split("/");
	if (a[3] != "search"){
		location.href = "spotify:"+a[3]+":"+a[4];
		window.close();
	}
})();