Skip to content

Instantly share code, notes, and snippets.

@jrandiny
Last active April 7, 2024 14:02
Show Gist options
  • Select an option

  • Save jrandiny/4fa5d382f867a2e6fc35f7d89c8a1c98 to your computer and use it in GitHub Desktop.

Select an option

Save jrandiny/4fa5d382f867a2e6fc35f7d89c8a1c98 to your computer and use it in GitHub Desktop.
Generate humble bundle tier list (only tested using usd and english language)
function generateTierSummary() {
const tierList = document.querySelectorAll(".tier-item-details-view");
const output = Array.from(tierList).map((entry)=>{
const title = entry.querySelector(".heading-medium").textContent;
const rawPrice = entry.querySelector(".tier-price").textContent.trim();
const price = rawPrice.match(/\d+/)[0];
return `${price} | ${title}`
});
console.log(output.join("\n"));
}
@jrandiny
Copy link
Author

jrandiny commented Apr 7, 2024

With this script you can easily compare the content of each tier and decide which tier is the best for you

Example

Page: https://www.humblebundle.com/games/virtual-realities-mystery-mayhem
Output:

20 | The 7th Guest VR
20 | Firmament
15 | Another Fisherman's Tale
15 | After the Fall: Deluxe Edition
15 | No More Rainbows
10 | Arizona Sunshine Deluxe Edition
10 | Broken Edge
10 | 45% Discount - Arizona Sunshine 2 Deluxe Edition
4 | A Fisherman's Tale

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment