From 5ea79a204e0ada8d99fa41bdc2cf071beea53ae8 Mon Sep 17 00:00:00 2001 From: "Dr.Blank" <64108942+Dr-Blank@users.noreply.github.com> Date: Fri, 24 Nov 2023 06:35:37 -0500 Subject: [PATCH 1/2] add atisket link for convinience --- apple-music-barcode-isrc.user.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/apple-music-barcode-isrc.user.js b/apple-music-barcode-isrc.user.js index 057c650..c2a45de 100644 --- a/apple-music-barcode-isrc.user.js +++ b/apple-music-barcode-isrc.user.js @@ -167,6 +167,20 @@ async function getDatums() { e.stopPropagation() window.open(e.target.href, e.target.target) }) + const atisketLink = addSimple( + "open atisket with this album", + "a", + addSimple("", "p", results) + ); + atisketLink.target = "_blank"; + atisketLink.href = `https://atisket.pulsewidth.org.uk/?preferred_countries=in&upc=${album.barcode}&preffered_vendor=itu&itu_id=${albumId}`; + atisketLink.style.color = "#06c"; + atisketLink.style.textDecoration = "underline"; + atisketLink.addEventListener("click", (e) => { + e.preventDefault(); + e.stopPropagation(); + window.open(e.target.href, e.target.target); + }); const hasMultipleDiscs = album.tracks.some(t => t.disc !== 1) From cdfd8d21c7f297faa2d0554181d8f0d1b0596153 Mon Sep 17 00:00:00 2001 From: "Dr.Blank" <64108942+Dr-Blank@users.noreply.github.com> Date: Fri, 24 Nov 2023 06:43:30 -0500 Subject: [PATCH 2/2] make preferred country same as apple page --- apple-music-barcode-isrc.user.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apple-music-barcode-isrc.user.js b/apple-music-barcode-isrc.user.js index c2a45de..1e1d707 100644 --- a/apple-music-barcode-isrc.user.js +++ b/apple-music-barcode-isrc.user.js @@ -173,7 +173,7 @@ async function getDatums() { addSimple("", "p", results) ); atisketLink.target = "_blank"; - atisketLink.href = `https://atisket.pulsewidth.org.uk/?preferred_countries=in&upc=${album.barcode}&preffered_vendor=itu&itu_id=${albumId}`; + atisketLink.href = `https://atisket.pulsewidth.org.uk/?preferred_countries=${country}&upc=${album.barcode}&preffered_vendor=itu&itu_id=${albumId}`; atisketLink.style.color = "#06c"; atisketLink.style.textDecoration = "underline"; atisketLink.addEventListener("click", (e) => {