Skip to content

Instantly share code, notes, and snippets.

@mageddo mageddo/main.js
Last active Mar 26, 2020

Embed
What would you like to do?
Steam wishlist JSON generator
var games = [];
jQuery(".wishlist_row").each(function(){
games.push(toGame(jQuery(this)));
});
var str = "";
games.forEach(it => {
str += it.name + "\t" + it.originalPrice + "\t" + it.price + "\n";
});
console.log(str);
function toGame(o){
return {
name: o.find(".title").text().trim(),
originalPrice: o.find(".discount_original_price").text().trim(),
price: o.find(".discount_final_price").text().trim(),
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.