Last active
July 26, 2017 03:43
-
-
Save shockey/4c46b5d5be92a6dcb21ce334ed66603b to your computer and use it in GitHub Desktop.
Calculate total value of Discogs wantlist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Open this page: https://www.discogs.com/mywantlist?page=1&limit=250, | |
// open your Developer Tools console (right click -> inspect element, | |
// console tab), then paste the code below into the console. | |
// | |
// If you have more than 250 records in your Wantlist, run this | |
// code on each page of your Wantlist. | |
console.log("total value is $" + | |
[].slice.call(document.querySelectorAll("span.price")) | |
.map(el => parseFloat(el.innerText.slice(1))) | |
.reduce((p, c) => p + c, 0) | |
.toFixed(2)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment