I also tried to run it with
plasmawindowed org.kde.plasma.bitcoinprice
command and got
file:///home/user/.local/share/plasma/plasmoids/org.kde.plasma.bitcoinprice/contents/code/bitcoin.js:71: SyntaxError: JSON.parse: Parse error
error.
I also tried to run the
console.log("hello world!");
let rate = getRate("Blockchain.info", "$",
function(rate) {
if(!plasmoid.configuration.showDecimals) rate = Math.floor(rate);
var rateText = Number(rate).toLocaleCurrencyString(Qt.locale(), Bitcoin.currencySymbols[plasmoid.configuration.currency]);
if(!plasmoid.configuration.showDecimals) rateText = rateText.replace(Qt.locale().decimalPoint + '00', '');
root.bitcoinRate = rateText;
var toolTipSubText = '<b>' + root.bitcoinRate + '</b>';
toolTipSubText += '<br />';
toolTipSubText += i18n('Market:') + ' ' + plasmoid.configuration.source;
plasmoid.toolTipSubText = toolTipSubText;
root.updatingRate = false;
});
console.log(rate);
inside Webstorm (pasted at the end of the bitcoin.js file), but having issues with line 147:
var xhr = new XMLHttpRequest();
^
ReferenceError: XMLHttpRequest is not defined
I also tried to run it with
command and got
error.
I also tried to run the
inside Webstorm (pasted at the end of the bitcoin.js file), but having issues with line 147: