IsThereAnyDeal / AugmentedSteam

Augments your Steam Experience
https://augmentedsteam.com
GNU General Public License v3.0
1.31k stars 84 forks source link

[FEATURE REQUEST] A market item gem worth (script included) #1927

Open usercon opened 1 week ago

usercon commented 1 week ago

Purpose

Seeing an item's worth, in gems, right from a marketplace.

[!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");

candela97 commented 1 week ago

Thanks for the idea! Do you have any suggestions where on the page we should display this info?

usercon commented 1 week ago

123

[!IMPORTANT] Also you should have this in mind.