spotify2image
https://spotify2image.vercel.app/image/track/6gaZcXe2iEaXSIZg1wgIAM#.png https://open.spotify.com/track/6gaZcXe2iEaXSIZg1wgIAM
https://open.spotify.com/album/1bgUOjg3V0a7tvEfF1N6Kk
https://open.spotify.com/track/231z9O03a2yRcj6xTJmPCo
https://open.spotify.com/track/6gaZcXe2iEaXSIZg1wgIAM
code:userscript.js
const spotifyRegex = /open.spotify.com\/(album|artist|playlist|track)\/(.+)/
scrapbox.PopupMenu.addButton({
title: text => spotifyRegex.test(text) ? "Spotify" : null,
onClick: (text) => {
const m = text.match(spotifyRegex);
if (!m) return text;
return [https://spotify2image.vercel.app/image/${m[1]}/${m[2]}#.png https://open.spotify.com/${m[1]}/${m[2]}];
},
});