From 5de1a557f11d1095b989ce0d60d9ccc720cb1adc Mon Sep 17 00:00:00 2001 From: Maxim Slipenko Date: Sat, 22 Jun 2024 23:29:56 +0300 Subject: [PATCH] [SteamPriceConverter] update to 0.4 fix some bugs --- SteamPriceConverter/SteamPriceConverter.user.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/SteamPriceConverter/SteamPriceConverter.user.js b/SteamPriceConverter/SteamPriceConverter.user.js index fcae75b..98e0124 100644 --- a/SteamPriceConverter/SteamPriceConverter.user.js +++ b/SteamPriceConverter/SteamPriceConverter.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name Steam Price Converter // @namespace https://github.com/Maks1mS/userscripts -// @version 0.3 +// @version 0.4 // @description Converts prices to rubles // @author Maxim Slipenko // @match https://store.steampowered.com/* @@ -23,6 +23,9 @@ source_symbol: undefined } + const delay = (ms) => + new Promise(resolve => setTimeout(resolve, ms)); + async function getRates() { const arr = await new Promise((resolve, reject) => { GM_xmlhttpRequest({ @@ -62,12 +65,12 @@ return; } - setTimeout(75); + await delay(75); const convert = (n) => +(n * rates[source_valute].value).toFixed(2); replace(convert); - GM_registerMenuCommand("update", () => replace(convert), "u"); + // GM_registerMenuCommand("update", () => replace(convert), "u"); } function replace(convert) {