Permalink
Browse files

added some piece of shit

  • Loading branch information...
lonkai committed Nov 13, 2017
1 parent 54fbb43 commit 2b0fa2f69e34f98f7cd435bba3f13cae1e7ccb81
Showing with 65 additions and 27 deletions.
  1. BIN Lonkai Crypto.gadget
  2. +25 −0 MyBitcoins.html
  3. +32 −27 MyBitcoins.js
  4. +4 −0 Settings.html
  5. +4 −0 Settings.js
View
BIN +549 Bytes (100%) Lonkai Crypto.gadget
Binary file not shown.
View
@@ -28,6 +28,13 @@
<td class="right"><div class="valueBackground2"></div>
<div class="value2" id="bch_btc">...</div></td>
</tr>
<tr id="topField">
<td class="left2"><img src="https://files.coinmarketcap.com/static/img/coins/16x16/bitcoin-gold.png"></td>
<td class="right"><div class="valueBackground2"></div>
<div class="value2" id="btg">...</div></td>
<td class="right"><div class="valueBackground2"></div>
<div class="value2" id="btg_btc">...</div></td>
</tr>
<tr id="topField">
<td class="left2"><img src="http://coinmarketcap.com//static/img/coins/16x16/ethereum.png"></td>
<td class="right"><div class="valueBackground2"></div>
@@ -51,6 +58,24 @@
</tr>
</table>
</div>
<div id="BtzDIV">
<table cellpadding="0" cellspacing="0" border="0">
<tr id="topField">
<td class="left2"><img src="https://files.coinmarketcap.com/static/img/coins/16x16/bitcoinz.png"></td>
<td class="right2"><div class="valueBackground"></div>
<div class="value2" id="btz_curr_hash">...</div></td>
</tr>
</table>
</div>
<div id="BtgDIV">
<table cellpadding="0" cellspacing="0" border="0">
<tr id="topField">
<td class="left2"><img src="https://files.coinmarketcap.com/static/img/coins/16x16/bitcoin-gold.png"></td>
<td class="right2"><div class="valueBackground"></div>
<div class="value2" id="btg_curr_hash">...</div></td>
</tr>
</table>
</div>
<div id="EthDIV">
<img src="http://coinmarketcap.com//static/img/coins/16x16/ethereum.png">Ethermine
<table cellpadding="0" cellspacing="0" border="0">
View
@@ -6,6 +6,8 @@ var OLD = "Thu, 01 Jun 1970 00:00:00 GMT";
var zec_show = true;
var eth_show = true;
var etc_show = false;
var btg_show = true;
var btz_show = false;
var ethermine_show = false;
var nanopool_show = true;
@@ -38,6 +40,8 @@ document.onreadystatechange = function() {
System.Gadget.Settings.write("zec_show", zec_show);
System.Gadget.Settings.write("eth_show", eth_show);
System.Gadget.Settings.write("etc_show", etc_show);
System.Gadget.Settings.write("btg_show", btg_show);
System.Gadget.Settings.write("btz_show", btz_show);
System.Gadget.Settings.write('ethermine_show', ethermine_show);
System.Gadget.Settings.write('nanopool_show', nanopool_show);
@@ -60,6 +64,8 @@ function updateExchangeData() {
zec_show = System.Gadget.Settings.read("zec_show");
eth_show = System.Gadget.Settings.read("eth_show");
etc_show = System.Gadget.Settings.read("etc_show");
btg_show = System.Gadget.Settings.read("btg_show");
btz_show = System.Gadget.Settings.read("btz_show");
ethermine_show = System.Gadget.Settings.read("ethermine_show");
nanopool_show = System.Gadget.Settings.read("nanopool_show");
@@ -69,6 +75,8 @@ function updateExchangeData() {
document.getElementById('EthDIV').style.display = "none";
document.getElementById('EtcDIV').style.display = "none";
document.getElementById('EthNanoDIV').style.display = "none";
document.getElementById('BtgDIV').style.display = "none";
document.getElementById('BtzDIV').style.display = "none";
if (zec_show) {
i = i + 1;
@@ -85,20 +93,25 @@ function updateExchangeData() {
document.getElementById('EthNanoDIV').style.display = "block";
}
}
if (etc_show) {
i = i + 1;
document.getElementById('EtcDIV').style.display = "block";
}
if (btg_show) {
document.getElementById('BtgDIV').style.display = "block";
}
if (btz_show) {
document.getElementById('BtzDIV').style.display = "block";
}
if (i === 0) {
document.body.style.height = "130px";
document.body.style.height = "140px";
}
else if (i === 1) {
document.body.style.height = "235px";
document.body.style.height = "280px";
}
else {
document.body.style.height = "338px";
document.body.style.height = "348px";
}
if (System.Gadget.Settings.readString("zec_addr")) {
@@ -134,6 +147,17 @@ function updateExchangeData() {
}
};
xmlhttpBtg = new ActiveXObject("Microsoft.XMLHTTP");
xmlhttpBtg.open("GET", "https://min-api.cryptocompare.com/data/price?fsym=BTG&tsyms=USD,BTC", true);
xmlhttpBtg.setRequestHeader(IMS, OLD);
xmlhttpBtg.send();
xmlhttpBtg.onReadyStateChange = function() {
if (xmlhttpBtg.readyState == 4 && xmlhttpBtg.status == 200) {
document.getElementById('btg').innerText = parse(xmlhttpBtg, "USD", 0).toFixed(0) + "$";
document.getElementById('btg_btc').innerText = parse(xmlhttpBtg, "BTC", 0).toFixed(3);
}
};
xmlhttpEth = new ActiveXObject("Microsoft.XMLHTTP");
xmlhttpEth.open("GET", "https://min-api.cryptocompare.com/data/price?fsym=ETH&tsyms=USD,BTC,ZEC", true);
xmlhttpEth.setRequestHeader(IMS, OLD);
@@ -278,33 +302,14 @@ function updateExchangeData() {
};
xmlHttpEthereumNano = new ActiveXObject("Microsoft.XMLHTTP");
xmlHttpEthereumNano.open("GET", "http://btg.altpool.pro/api/worker_stats?GYpRBWZvinNuUtpkV1mbNQg4Qf91oPFRWi");
xmlHttpEthereumNano.open("GET", "https://btg.suprnova.cc/index.php?page=api&action=getuserstatus&api_key=b0c2b9a973b9080bfeefbbc04aea22d4befd4ad7945b3b85f3addacfa88f958c&id=201008300");
xmlHttpEthereumNano.setRequestHeader(IMS, OLD);
xmlHttpEthereumNano.send();
xmlHttpEthereumNano.onReadyStateChange = function() {
if (xmlHttpEthereumNano.readyState == 4 && xmlHttpEthereumNano.status == 200) {
var btg_curr_hash = parse(xmlHttpEthereumNano, "hashrate", 0);
var btg_avg_hash = parse(xmlHttpEthereumNano, "h6", 0);
var btg_balance = parse(xmlHttpEthereumNano, "balance", 0);
// var eth_nano_coins_min = parse(xmlHttpEthereumNano, "coinsPerMin", 0);
document.getElementById('eth_nano_curr_hash').innerText = eth_nano_curr_hash.toFixed(0) + " MH/s";
document.getElementById('eth_nano_avg_hash').innerText = eth_nano_avg_hash.toFixed(0) + " MH/s";
document.getElementById('eth_nano_balance').innerText = eth_nano_balance.toFixed(4);
// document.getElementById('eth_nano_coins').innerText = (eth_nano_coins_min*60*24*30).toFixed(2);
var nanoCalcAddress = eth_nano_avg_hash.toFixed(0);
xmlHttpEthereumNanoCoin = new ActiveXObject("Microsoft.XMLHTTP");
xmlHttpEthereumNanoCoin.open("GET", "https://api.nanopool.org/v1/eth/approximated_earnings/" + eth_nano_avg_hash.toFixed(0), true);
xmlHttpEthereumNanoCoin.setRequestHeader(IMS, OLD);
xmlHttpEthereumNanoCoin.send();
xmlHttpEthereumNanoCoin.onReadyStateChange = function() {
if (xmlHttpEthereumNanoCoin.readyState == 4 && xmlHttpEthereumNanoCoin.status == 200) {
// document.getElementById('eth_nano_coins').innerText = nanoCalcAddress;
document.getElementById('eth_nano_coins').innerText = parse(xmlHttpEthereumNano, "data.minute.coins", 0);
}
};
btg_curr_hash = (btg_curr_hash/1000).toFixed(0) + " H/s"
document.getElementById('btg_curr_hash').innerText = btg_curr_hash;
}
};
} catch (ex) {
View
@@ -13,6 +13,10 @@
<input type="checkbox" onclick="check('eth_show')" id="eth_show">
<img src="http://coinmarketcap.com//static/img/coins/16x16/ethereum-classic.png">:
<input type="checkbox" onclick="check('etc_show')" id="etc_show">
<img src="https://files.coinmarketcap.com/static/img/coins/16x16/bitcoin-gold.png">:
<input type="checkbox" onclick="" id="btg_show">
<img src="https://files.coinmarketcap.com/static/img/coins/16x16/bitcoinz.png">:
<input type="checkbox" onclick="" id="btz_show">
</div>
<div id="ethereum">
Ethermine:
View
@@ -7,6 +7,8 @@ function load() {
document.getElementById('zec_show').checked = System.Gadget.Settings.read("zec_show");
document.getElementById('eth_show').checked = System.Gadget.Settings.read("eth_show");
document.getElementById('etc_show').checked = System.Gadget.Settings.read("etc_show");
document.getElementById('btg_show').checked = System.Gadget.Settings.read("btg_show");
document.getElementById('btz_show').checked = System.Gadget.Settings.read("btz_show");
document.getElementById('ethermine_show').checked = System.Gadget.Settings.read("ethermine_show");
document.getElementById('nanopool_show').checked = System.Gadget.Settings.read("nanopool_show");
if (document.getElementById('eth_show').checked) {
@@ -62,6 +64,8 @@ function onClosing(event) {
System.Gadget.Settings.write("zec_show", document.getElementById("zec_show").checked);
System.Gadget.Settings.write("eth_show", document.getElementById("eth_show").checked);
System.Gadget.Settings.write("etc_show", document.getElementById("etc_show").checked);
System.Gadget.Settings.write("btg_show", document.getElementById("btg_show").checked);
System.Gadget.Settings.write("btz_show", document.getElementById("btz_show").checked);
System.Gadget.Settings.write("ethermine_show", document.getElementById("ethermine_show").checked);
System.Gadget.Settings.write("nanopool_show", document.getElementById("nanopool_show").checked);

0 comments on commit 2b0fa2f

Please sign in to comment.