[FEATURE REQUEST] A market item gem worth (script included)
usercon opened this issue · 2 comments
Purpose
Seeing an item's worth, in gems, right from a marketplace.
- Exclusively for trading cards, emoticons and backgrounds.
Tip
Works just fine as a bookmarklet too.
Code
javascript:var a=g_rgAssets[Object.keys(g_rgAssets)[0]],b=a[Object.keys(a)[0]],c=b[Object.keys(b)[0]],gem_action=c.owner_actions&&c.owner_actions.filter(function(d){return/javascript:GetGooValue/.test(d.link)})[0];if(gem_action){var matches=gem_action.link.match(/javascript:GetGooValue\( '%contextid%', '%assetid%', (\d+), (\d+), \d+ \)/);fetch("https://steamcommunity.com/auction/ajaxgetgoovalueforitemtype/?appid="+matches[1]+"&item_type="+matches[2]+"&border_color=0").then(function(d){return d.json()}).then(function(d){alert("This is worth "+d.goo_value+" gems")})["catch"](function(d){return console.error(d)})}else alert("This is worth 0 gems");
Thanks for the idea! Do you have any suggestions where on the page we should display this info?
- Here a suggestion or two.
Important
Also you should have this in mind.
-
Any item can have item description space filled with a long text or whatever, just like that Zup! 3 Background. But tbh this kinda rare, more like a exception of the rule. Still wanted to mention it, so you get a full picture.
-
Your call, I don't doubt in you guys 🙂