├── .gitattributes ├── README.md ├── .gitignore └── steam-receipt.js /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | *.sln merge=union 7 | *.csproj merge=union 8 | *.vbproj merge=union 9 | *.fsproj merge=union 10 | *.dbproj merge=union 11 | 12 | # Standard to msysgit 13 | *.doc diff=astextplain 14 | *.DOC diff=astextplain 15 | *.docx diff=astextplain 16 | *.DOCX diff=astextplain 17 | *.dot diff=astextplain 18 | *.DOT diff=astextplain 19 | *.pdf diff=astextplain 20 | *.PDF diff=astextplain 21 | *.rtf diff=astextplain 22 | *.RTF diff=astextplain 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Steam Receipt Bookmarklet 2 | ========================= 3 | 4 | **NOTE: THIS TOOL HAS BEEN SUPERCEDED BY NATIVE STEAM FUNCTIONALITY. AS A RESULT, THIS REPO WILL NO LONGER BE MAINTAINED. FOR DETAILS, SEE: https://www.mysteamgauge.com/receipt** 5 | 6 | Purpose 7 | ------- 8 | Tools like [Steam Gauge](http://www.mysteamgauge.com) can only return the Steam store price of a game, and not the amount you actually paid for it. This is because Valve does not allow access to your Steam transaction history by outside parties. However, you can still see a transaction history of your account on Steam's website at: https://store.steampowered.com/account 9 | 10 | Unfortunately, the transaction history isn't as straightforward as it could be. This javascript bookmarklet summarizes your account data quickly and easily. 11 | 12 | Usage 13 | ----- 14 | Simply create a new bookmark with the contents of the js file. When you're on one of your account transactions pages, click the bookmarklet to get a pop-up summary of your account spending. 15 | 16 | Limitations/Known Issues 17 | ------------------------ 18 | Steam does track key redemptions (from game bundles, retail purchase, etc), but has no way of knowing how much you paid for it, so those costs are excluded. 19 | 20 | Steam used to store all transaction types at a single url. Since the recent redesign, however, the transaction types have been split into separate pages, making a single aggregate summary from Steam Receipt of all transaction types impossible. 21 | 22 | Author 23 | ------ 24 | Jonathan Prusik @jprusik [www.classynemesis.com](http://www.classynemesis.com) 25 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ################# 2 | ## Eclipse 3 | ################# 4 | 5 | *.pydevproject 6 | .project 7 | .metadata 8 | bin/ 9 | tmp/ 10 | *.tmp 11 | *.bak 12 | *.swp 13 | *~.nib 14 | local.properties 15 | .classpath 16 | .settings/ 17 | .loadpath 18 | 19 | # External tool builders 20 | .externalToolBuilders/ 21 | 22 | # Locally stored "Eclipse launch configurations" 23 | *.launch 24 | 25 | # CDT-specific 26 | .cproject 27 | 28 | # PDT-specific 29 | .buildpath 30 | 31 | 32 | ################# 33 | ## Visual Studio 34 | ################# 35 | 36 | ## Ignore Visual Studio temporary files, build results, and 37 | ## files generated by popular Visual Studio add-ons. 38 | 39 | # User-specific files 40 | *.suo 41 | *.user 42 | *.sln.docstates 43 | 44 | # Build results 45 | [Dd]ebug/ 46 | [Rr]elease/ 47 | *_i.c 48 | *_p.c 49 | *.ilk 50 | *.meta 51 | *.obj 52 | *.pch 53 | *.pdb 54 | *.pgc 55 | *.pgd 56 | *.rsp 57 | *.sbr 58 | *.tlb 59 | *.tli 60 | *.tlh 61 | *.tmp 62 | *.vspscc 63 | .builds 64 | *.dotCover 65 | 66 | ## TODO: If you have NuGet Package Restore enabled, uncomment this 67 | #packages/ 68 | 69 | # Visual C++ cache files 70 | ipch/ 71 | *.aps 72 | *.ncb 73 | *.opensdf 74 | *.sdf 75 | 76 | # Visual Studio profiler 77 | *.psess 78 | *.vsp 79 | 80 | # ReSharper is a .NET coding add-in 81 | _ReSharper* 82 | 83 | # Installshield output folder 84 | [Ee]xpress 85 | 86 | # DocProject is a documentation generator add-in 87 | DocProject/buildhelp/ 88 | DocProject/Help/*.HxT 89 | DocProject/Help/*.HxC 90 | DocProject/Help/*.hhc 91 | DocProject/Help/*.hhk 92 | DocProject/Help/*.hhp 93 | DocProject/Help/Html2 94 | DocProject/Help/html 95 | 96 | # Click-Once directory 97 | publish 98 | 99 | # Others 100 | [Bb]in 101 | [Oo]bj 102 | sql 103 | TestResults 104 | *.Cache 105 | ClientBin 106 | stylecop.* 107 | ~$* 108 | *.dbmdl 109 | Generated_Code #added for RIA/Silverlight projects 110 | 111 | # Backup & report files from converting an old project file to a newer 112 | # Visual Studio version. Backup files are not needed, because we have git ;-) 113 | _UpgradeReport_Files/ 114 | Backup*/ 115 | UpgradeLog*.XML 116 | 117 | 118 | 119 | ############ 120 | ## Windows 121 | ############ 122 | 123 | # Windows image file caches 124 | Thumbs.db 125 | 126 | # Folder config file 127 | Desktop.ini 128 | 129 | 130 | ############# 131 | ## Python 132 | ############# 133 | 134 | *.py[co] 135 | 136 | # Packages 137 | *.egg 138 | *.egg-info 139 | dist 140 | build 141 | eggs 142 | parts 143 | bin 144 | var 145 | sdist 146 | develop-eggs 147 | .installed.cfg 148 | 149 | # Installer logs 150 | pip-log.txt 151 | 152 | # Unit test / coverage reports 153 | .coverage 154 | .tox 155 | 156 | #Translations 157 | *.mo 158 | 159 | #Mr Developer 160 | .mr.developer.cfg 161 | 162 | # Mac crap 163 | .DS_Store 164 | -------------------------------------------------------------------------------- /steam-receipt.js: -------------------------------------------------------------------------------- 1 | if (location.href.match('store.steampowered.com/account/') && location.href.match(/store_transactions|ingame_transactions|market_transactions/i)){ 2 | var steamReceipt={'transactionsPage':location.href.split('/account/')[1].split('/')[0].split('?')[0], 'transactions':[], 'currencyList':[], 'currencyTotals':[], 'wallet':jQuery('.price')[0].innerHTML, 'transactionCount':0, 'externalCount':0, 'priceTotal':0, 'credits':0}; 3 | 4 | jQuery('.transactionRow.even, .transactionRow.odd').each(function(){ 5 | var transaction = { 6 | 'date':jQuery(this).find('.transactionRowDate').text(), 7 | 'currency':jQuery(this).find('.transactionRowPrice').text().replace(/[\w\s-.,]/g, ''), 8 | 'price':Number(jQuery(this).find('.transactionRowPrice').text().replace(/[^\d.,-]/g, '').replace('\,','\.').replace(/-/g,'0').split('.').splice(0,2).join('.')), 9 | 'event':jQuery(this).find('.transactionRowEvent').text(), 10 | 'description':jQuery(this).find('.transactionRowEvent .transactionRowTitle').text(), 11 | 'descriptionSub':jQuery(this).find('.transactionRowEvent .itemSubtext').text() 12 | }; 13 | 14 | // Check if the row is an actual transaction (will always have a transactionRowDate element) 15 | if (jQuery(this).find('.transactionRowDate')[0]){ 16 | // Check if the transaction was a credit to the account 17 | if (jQuery(this).find('.transactionRowEvent').hasClass('walletcredit')){ 18 | transaction.price *=-1; 19 | steamReceipt.credits +=1; 20 | } 21 | 22 | // Special case for Russian Rubles 23 | if (transaction.currency.toString() === 'уб'){ 24 | transaction.currency = 'pуб'; 25 | } 26 | 27 | // Find out how many currencies we're working with and sum them individually 28 | var currency_string = transaction.currency.toString(); 29 | if ((jQuery.inArray(transaction.currency, steamReceipt.currencyList) === -1) && (transaction.currency)){ 30 | steamReceipt.currencyList.push(currency_string); 31 | steamReceipt.currencyTotals[currency_string]=0; 32 | } 33 | if (transaction.currency){ 34 | steamReceipt.currencyTotals[currency_string] += transaction.price; 35 | } 36 | 37 | // Add up the transactions 38 | if (transaction.price){ 39 | } 40 | else{ 41 | steamReceipt.externalCount += 1; 42 | } 43 | steamReceipt.transactionCount += 1; 44 | 45 | steamReceipt.transactions.push(transaction); 46 | } 47 | }); 48 | 49 | // Build the tables for the page 50 | jQuery('#steam_gauge_wrapper').remove(); 51 | var transaction_type = steamReceipt.transactionsPage.replace('_', ' '); 52 | jQuery('.pageheader').after('

You\'ve made '+steamReceipt.transactionCount+' '+transaction_type+' on Steam.

'+steamReceipt.externalCount+' of those are product redemptions on Steam for external purchases (Steam doesn\'t know how much you paid).

The total amount spent on your Steam account \(within Steam\) on '+transaction_type+' can be seen to the right. These totals include store purchases, wallet funding, gift purchases, and in-game purchases.

Your Steam wallet currently contains '+steamReceipt.wallet+'

CurrencyTotal Spent
(negative values are credits)

Steam Receipt was developed by Steam Gauge and is in no way affiliated with Valve.

'); 53 | jQuery(steamReceipt.currencyList).each(function(){ 54 | jQuery('#steam_gauge_receipt_table tbody').append(''+this+''+Math.round(steamReceipt.currencyTotals[this]*100)/100+''); 55 | }); 56 | jQuery('head').append(''); 57 | } 58 | else{ 59 | window.alert('This script only works on Steam transaction pages under:\n\nhttps://store.steampowered.com/account/'); 60 | } 61 | --------------------------------------------------------------------------------