web-services/bandcamp: Add snippet for total purchase value

This commit is contained in:
Simon Bruder 2022-06-09 22:00:38 +02:00
parent 5f48f4cb69
commit 7c09b7cf61
Signed by: simon
GPG key ID: 8D3C82F9F309F8EC

View file

@ -27,6 +27,14 @@
:::js
[...document.querySelectorAll('#track_table .track_row_view')].map(el => `${el.querySelector('.track_number').innerText} ${el.querySelector('.track-title').innerText} (${el.querySelector('.time').innerText})`).join("\n")
### Show total purchase value
Works on https://bandcamp.com/USERNAME/purchases
The result needs to be feeded into an intelligent calculator like qalc.
:::js
Array.from(document.querySelectorAll(".col.purchases-item-total div")).map(el => {const raw = el.children[1].innerText.replace("\n", " ").replace(",", ""); return raw.substr(1, raw.len)}).join(" + ")
## Ototoy
### Get title listing (for MusicBrainz)