crypto-price-widget icon indicating copy to clipboard operation
crypto-price-widget copied to clipboard

Added always show USD option

Open RenanMsV opened this issue 3 years ago • 0 comments

I wanted it to show my main country currency (BRL) and also have it showing standard USD at the same time.

Made it by also requesting USD data in the url with

"&tsyms=" + base + ",USD&extraParams=crypto-price-widget";

if (base != "USD" && settings.get("user.alwaysShowUsd") == "yes") { // display also prices in USD
    coinRate = coinRate + (" <small>($") + coinRAW["USD"].PRICE.toFixed(4) + ")</small>"
}

It works good, even added an option for it in the settings.

Feel free to deny this pull request and do it differently.

Best regards, RenanMsV

RenanMsV avatar Apr 19 '21 13:04 RenanMsV