0
0
mirror of https://github.com/Maks1mS/userscripts.git synced 2024-12-23 16:22:59 +03:00

[SteamPriceConverter] update to 0.4

fix some bugs
This commit is contained in:
Maxim Slipenko 2024-06-22 23:29:56 +03:00
parent db9d93407d
commit 5de1a557f1

View File

@ -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) {