Permalink
Browse files

Merge pull request #1187 from JoiNNN/add_wallet_balance-as-option

UPDATE: Steam wallet balance in header as option
2 parents d8f76ca + a3bf187 commit eab98bff7b63c11efe169ad57d7b5a6177f61d46 @jshackles committed on GitHub Nov 23, 2016
Showing with 13 additions and 3 deletions.
  1. +7 −2 enhancedsteam.js
  2. +2 −1 js/options.js
  3. +1 −0 localization/en/strings.json
  4. +3 −0 options.html
View
@@ -2122,8 +2122,13 @@ function send_age_verification() {
// Display Steam Wallet funds in header
function add_wallet_balance_to_header() {
- $("#global_action_menu").append("<div id='es_wallet' style='text-align:right; padding-right:12px; line-height: normal;'>");
- $("#es_wallet").load('http://store.steampowered.com #header_wallet_ctn');
+ storage.get(function(settings) {
+ if (settings.add_wallet_balance === undefined) { settings.add_wallet_balance = true; storage.set({'add_wallet_balance': settings.add_wallet_balance}); }
+ if (settings.add_wallet_balance) {
+ $("#global_action_menu").append("<div id='es_wallet' style='text-align:right; padding-right:12px; line-height: normal;'>");
+ $("#es_wallet").load('//store.steampowered.com/about/ #header_wallet_ctn');
+ }
+ });
}
// Checks to see if the extension has been updated
View
@@ -150,7 +150,8 @@ var settings_defaults = {
"profile_astatsnl": true,
"profile_permalink": true,
"steamcardexchange": true,
- "purchase_dates": true
+ "purchase_dates": true,
+ "add_wallet_balance": true
};
// Saves options to localStorage
@@ -338,6 +338,7 @@
"friends_rec": "Items your friends have reviewed",
"lowestprice_header": "Price History Information",
"total_spent": "Show total spent on account page",
+ "add_wallet_balance": "Show Steam Wallet funds in header",
"about_text": "<div class=\"header\">About <a href='http://www.enhancedsteam.com'>Enhanced Steam</a>:</div><p>Enhanced Steam is an Extension for Google Chrome that adds many new features to the Steam website.<p>Features include:<ul><li>Highlighting games you already own</li><li>Highlighting games on your wishlist</li><li>Correctly calculating bundle discounts based on games you already own</li><li>Showing you how much money you've spent on Steam for the lifetime of your account</li><li>Highlighting DLC you own on a game page</li><li>Fixing \"No Image Available\" game icons on your wishlist for any game or DLC</li><li>Pointing out titles with 3rd party DRM</li></ul><p>If you find this Extension useful, please consider donating.",
"stores_all": "Compare all stores",
"show_early_access_text": "Show Early Access image banners",
View
@@ -442,6 +442,9 @@
<input type="checkbox" id="showtotal" data-setting="showtotal"><label for="showtotal" id="total_spent_text" data-locale-text="options.total_spent">Show total spent on account page</label>
</li>
<li>
+ <input type="checkbox" id="add_wallet_balance" data-setting="add_wallet_balance"><label for="add_wallet_balance" id="add_wallet_balance_text" data-locale-text="options.add_wallet_balance">Show Steam Wallet funds in header</label>
+ </li>
+ <li>
<input type="checkbox" id="showallachievements" data-setting="showallachievements"><label for="showallachievements" id="allachievements_text" data-locale-text="options.showallachievements">Show achievement stats on "All Games" page</label>
</li>
<li>

0 comments on commit eab98bf

Please sign in to comment.