Steam Currency Convert: Convert ARS to CNY only

A simple way to make Steam Argentine user perceive the low prices. Convert ARS to CNY only,for now.

  1. // ==UserScript==
  2. // @name Steam Currency Convert: Convert ARS to CNY only
  3. // @name:zh Steam货币转换:目前仅支持阿根廷比索换算人民币
  4. // @description A simple way to make Steam Argentine user perceive the low prices. Convert ARS to CNY only,for now.
  5. // @description:zh 用简单粗暴的方式让Steam阿根廷区用户感受低价区的魅力,一遍遍汇率换算或者查SteamDB真的烦。目前仅支持阿根廷比索换算人民币。
  6. // @version 1.0
  7. // @author 无敌X哥
  8. // @namespace SteamCurrencyConvert
  9. // @match https://store.steampowered.com/*
  10. // @license MIT License
  11. // ==/UserScript==
  12.  
  13.  
  14. var er = 14.57; //汇率
  15. var labels = [
  16. 'discount_original_price', //原价
  17. 'discount_final_price', //折扣价
  18. 'game_purchase_price', //详情页价格
  19. 'game_area_dlc_price', //DLC
  20. 'global_action_link', //忘记了
  21. 'salepreviewwidgets_StoreSalePriceBox_3j4dI', //一些特卖价格
  22. 'cart_estimated_total', //购物车单价
  23. 'price' //购物车总价
  24. ];
  25.  
  26. function moneyExchange(labels){
  27. var re = /(\D*)(\d\S*)/;
  28. for(label in labels){
  29. let price = document.querySelectorAll(`.${labels[label]}`);
  30. if(price.length == 0) continue;
  31. for(ind in price){
  32. if(re.test(price[ind].textContent)){
  33. let matchItem = re.exec(price[ind].textContent);
  34. if(matchItem[1].indexOf('ARS') >= 0){
  35. let p = matchItem[2].replace('.','').replace(',','.');
  36. price[ind].textContent = '¥' + (p / er).toFixed(2);
  37. }
  38. }
  39. }
  40. }
  41. }
  42. setTimeout(function(){moneyExchange(labels)}, 1000);
  43. // window.onload = function(){moneyExchange(labels)};

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址