SM - Convert automatically balance to usd

Balance -> USD.

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

// ==UserScript==
// @name                SM - Convert automatically balance to usd
// @namespace           Hash G.
// @description         Balance -> USD.
// @include             *satoshimines.com*
// @require             http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js
// @version             1.0
// @grant               GM_getValue
// @grant               GM_setValue
// @grant               GM_deleteValue
// @grant               GM_xmlhttpRequest
// ==/UserScript==

var balance, btcAPI, usd;

$(document).bind("DOMSubtreeModified", function() {
	$(".balance > div:nth-child(1) > div:nth-child(1), #start_game, .cashout").on("click", function (){
		GM_xmlhttpRequest({
		method: "GET",
		url: "http://hashg.xyz/OMC-Rates/a.php",
			onload: function(response) {
				var responseText = response.responseText;
				var splittedResponse = responseText.split(":");
				btcAPI = splittedResponse[0] / 1000000;
				balance = $(".num").html();
				usd = btcAPI * balance;
				$(".balance > div:nth-child(1) > div:nth-child(1)").append("<span id='usdvalue'></span>");
				$("#usdvalue").html("= $" + usd.toFixed(3));
			}
		});
	});
});