Add Steam Currency Converter - #243
Conversation
|
Converting this to a draft — please hold off reviewing for now. Two things are landing before it's ready:
I'll mark it ready for review and advance the submodule pointer once that's done and tested on Stable + Beta. |
|
Out of draft and ready for review.
Still open: feedback on two other plugin PRs — will follow up. |
|
Disclosure: I am the author of #241 and tested this PR as part of the Community Contribution requirement. Fallback currency detection will mis-label JPY and SEKPrimary detection (wallet id, then meta[itemprop="priceCurrency"]) looks correct. The formatter fallback is not: ¥ is also JPY. kr is both NOK (id 9) and SEK (id 33); it is not in SIGN_TO_CURRENCY, so STEAM_CURRENCIES.find((c) => c.symbol === sign) returns NOK first. A Japanese or Swedish account that misses wallet + schema.org detection gets converted as CNY or NOK. Wallet id is the right source of truth — if it is missing, skipping conversion is better than a silently wrong rate. |
|
Thanks for testing, @kuusei — good catch. Fixed in v2.0.1 (pinned commit updated): the symbol-based formatter fallback is gone entirely. Source currency now comes only from the wallet id and the |
|
Community Contribution — review 1 of 2: #241 (comment) (Sort As Display — found 2 bugs worth fixing before merge: hooks not removed on unmount, and the SetCustomSortAs hook not retrying on a failed install). |
|
Community Contribution — review 2 of 2: #231 (comment) (Sortium — flagged the Augmented Steam / Steam Hunters API fan-out without a User-Agent or coordination, stringly-typed rate-limit detection, a NaN-comparator sort for missing data, and an O(n²) non-atomic cache write). |
Confirmed on 678e071. Formatter fallback is gone, and it skips conversion when wallet id / priceCurrency are both missing. LGTM. |
|
Pinned commit advanced to v2.0.2 (
CI green. |
|
Pinned commit advanced to |
Steam Currency Converter
Shows an approximate price in the currency you pick next to any Steam price — store, cart, checkout, community market, and the in-game overlay. It detects the account's wallet currency and appends
≈ N <cur>, computed from public exchange-rate JSON (fawazahmed0/exchange-api, 3 mirrors, cached 6 h). Not an official regional price — a raw exchange-rate estimate for quick comparison.Maintained fork of the existing (unlisted) https://github.com/KuroKim/steam-currency-to-rub. Differences:
add_browser_js<script src>(silently blocked by the store CSP in some regions, e.g. the Steam China store) to awebkit/module that Millennium loads withPage.setBypassCSP.1,234.56,1.234,56,1 199, zero-decimal currencies).createElement/textContent, noinnerHTML, noeval, no remote code. Network is limited to the exchange-rate endpoints inwebkit/index.tsx.Settings persistence goes through the lua backend (
get_settings/set_target_currencyviamillennium.config) becauseusePluginConfig/pluginConfigwere unreliable in the current Millennium build.No RUB/currency-conversion plugin is currently on the store.
Task Checklist
Developer
Plugin Functionality
Backend Configuration
Community Contribution
Testing Instructions