Browse Source

removed example

pull/123/head
notgiven688 3 years ago
parent
commit
3beb4ec5cf
10 changed files with 0 additions and 2579 deletions
  1. +0
    -230
      example/aeon/dropdown.js
  2. +0
    -373
      example/aeon/index.html
  3. BIN
      example/aeon/miner.png
  4. +0
    -642
      example/aeon/style.css
  5. +0
    -38
      example/aeon/webmr.js
  6. +0
    -230
      example/xmr/dropdown.js
  7. +0
    -386
      example/xmr/index.html
  8. BIN
      example/xmr/miner.png
  9. +0
    -642
      example/xmr/style.css
  10. +0
    -38
      example/xmr/webmr.js

+ 0
- 230
example/aeon/dropdown.js View File

@ -1,230 +0,0 @@
////////////////////////////////////
// prerequisite utility functions //
// the real stuff starts below //
////////////////////////////////////
var util = {
f: {
addStyle: function (elem, prop, val, vendors) {
var i, ii, property, value
if (!util.f.isElem(elem)) {
elem = document.getElementById(elem)
}
if (!util.f.isArray(prop)) {
prop = [prop]
val = [val]
}
for (i = 0; i < prop.length; i += 1) {
var thisProp = String(prop[i]),
thisVal = String(val[i])
if (typeof vendors !== "undefined") {
if (!util.f.isArray(vendors)) {
vendors.toLowerCase() == "all" ? vendors = ["webkit", "moz", "ms", "o"] : vendors = [vendors]
}
for (ii = 0; ii < vendors.length; ii += 1) {
elem.style[vendors[i] + thisProp] = thisVal
}
}
thisProp = thisProp.charAt(0).toLowerCase() + thisProp.slice(1)
elem.style[thisProp] = thisVal
}
},
cssLoaded: function (event) {
var child = util.f.getTrg(event)
child.setAttribute("media", "all")
},
events: {
cancel: function (event) {
util.f.events.prevent(event)
util.f.events.stop(event)
},
prevent: function (event) {
event = event || window.event
event.preventDefault()
},
stop: function (event) {
event = event || window.event
event.stopPropagation()
}
},
getPath: function (cb, args) {
GLOBAL.path = window.location.href.split("masterdemolition")[1].replace("inc.com/admin/", "").replace("inc.com/admin", "").replace("#!/", "").replace("#!", "").replace("#/", "").replace("#", "")
if (GLOBAL.path.indexOf("?") >= 0) {
GLOBAL.path = GLOBAL.path.split("?")[0]
}
if (typeof cb !== "undefined") {
typeof args !== "undefined" ? cb(args) : cb()
} else {
return GLOBAL.path
}
},
getSize: function (elem, prop) {
return parseInt(elem.getBoundingClientRect()[prop], 10)
},
getTrg: function (event) {
event = event || window.event
if (event.srcElement) {
return event.srcElement
} else {
return event.target
}
},
isElem: function (elem) {
return (util.f.isNode(elem) && elem.nodeType == 1)
},
isArray: function(v) {
return (v.constructor === Array)
},
isNode: function(elem) {
return (typeof Node === "object" ? elem instanceof Node : elem && typeof elem === "object" && typeof elem.nodeType === "number" && typeof elem.nodeName==="string" && elem.nodeType !== 3)
},
isObj: function (v) {
return (typeof v == "object")
},
replaceAt: function(str, index, char) {
return str.substr(0, index) + char + str.substr(index + char.length);
}
}
},
//////////////////////////////////////
// ok that's all the utilities //
// onto the select box / form stuff //
//////////////////////////////////////
form = {
f: {
init: {
register: function () {
var child, children = document.getElementsByClassName("field"), i
for (i = 0; i < children.length; i += 1) {
child = children[i]
util.f.addStyle(child, "Opacity", 1)
}
children = document.getElementsByClassName("psuedo_select")
for (i = 0; i < children.length; i += 1) {
child = children[i]
child.addEventListener("click", form.f.select.toggle)
}
},
unregister: function () {
//just here as a formallity
//call this to stop all ongoing timeouts are ready the page for some sort of json re-route
}
},
select: {
blur: function (field) {
field.classList.remove("focused")
var child, children = field.childNodes, i, ii, nested_child, nested_children
for (i = 0; i < children.length; i += 1) {
child = children[i]
if (util.f.isElem(child)) {
if (child.classList.contains("deselect")) {
child.parentNode.removeChild(child)
} else if (child.tagName == "SPAN") {
if (!field.dataset.value) {
util.f.addStyle(child, ["FontSize", "Top"], ["16px", "32px"])
}
} else if (child.classList.contains("psuedo_select")) {
nested_children = child.childNodes
for (ii = 0; ii < nested_children.length; ii += 1) {
nested_child = nested_children[ii]
if (util.f.isElem(nested_child)) {
if (nested_child.tagName == "SPAN") {
if (!field.dataset.value) {
util.f.addStyle(nested_child, ["Opacity", "Transform"], [0, "translateY(24px)"])
}
} else if (nested_child.tagName == "UL") {
util.f.addStyle(nested_child, ["Height", "Opacity"], [0, 0])
}
}
}
}
}
}
},
focus: function (field) {
field.classList.add("focused")
var bool = false, child, children = field.childNodes, i, ii, iii, nested_child, nested_children, nested_nested_child, nested_nested_children, size = 0
for (i = 0; i < children.length; i += 1) {
child = children[i]
util.f.isElem(child) && child.classList.contains("deselect") ? bool = true : null
}
if (!bool) {
child = document.createElement("div")
child.className = "deselect"
child.addEventListener("click", form.f.select.toggle)
field.insertBefore(child, children[0])
}
for (i = 0; i < children.length; i += 1) {
child = children[i]
if (util.f.isElem(child) && child.classList.contains("psuedo_select")) {
nested_children = child.childNodes
for (ii = 0; ii < nested_children.length; ii += 1) {
nested_child = nested_children[ii]
if (util.f.isElem(nested_child) && nested_child.tagName == "UL") {
size = 0
nested_nested_children = nested_child.childNodes
for (iii = 0; iii < nested_nested_children.length; iii += 1) {
nested_nested_child = nested_nested_children[iii]
if (util.f.isElem(nested_nested_child) && nested_nested_child.tagName == "LI") {
size += util.f.getSize(nested_nested_child, "height") - 10
// overwritten
size = 400
//console.log("size: " + size)
}
}
util.f.addStyle(nested_child, ["Height", "Opacity","Overflow"], [size + "px", 1,"auto"])
}
}
}
}
},
selection: function (child, parent) {
var children = parent.childNodes, i, ii, nested_child, nested_children, time = 0, value
if (util.f.isElem(child) && util.f.isElem(parent)) {
parent.dataset.value = child.dataset.value
value = child.innerHTML
}
for (i = 0; i < children.length; i += 1) {
child = children[i]
if (util.f.isElem(child)) {
if (child.classList.contains("psuedo_select")) {
nested_children = child.childNodes
for (ii = 0; ii < nested_children.length; ii += 1) {
nested_child = nested_children[ii]
if (util.f.isElem(nested_child) && nested_child.classList.contains("selected")) {
if (nested_child.innerHTML) {
time = 1E2
util.f.addStyle(nested_child, ["Opacity", "Transform"], [0, "translateY(24px)"], "all")
}
setTimeout(function (c, v) {
c.innerHTML = v
util.f.addStyle(c, ["Opacity", "Transform", "TransitionDuration"], [1, "translateY(0px)", ".1s"], "all")
}, time, nested_child, value)
}
}
} else if (child.tagName == "SPAN") {
util.f.addStyle(child, ["FontSize", "Top"], ["12px", "8px"])
}
}
}
},
toggle: function (event) {
util.f.events.stop(event)
var child = util.f.getTrg(event), children, i, parent
switch (true) {
case (child.classList.contains("psuedo_select")):
case (child.classList.contains("deselect")):
parent = child.parentNode
break
case (child.classList.contains("options")):
parent = child.parentNode.parentNode
break
case (child.classList.contains("option")):
parent = child.parentNode.parentNode.parentNode
form.f.select.selection(child, parent)
break
}
parent.classList.contains("focused") ? form.f.select.blur(parent) : form.f.select.focus(parent)
}
}
}}
window.onload = form.f.init.register

+ 0
- 373
example/aeon/index.html View File

@ -1,373 +0,0 @@
<!--
LICENSE FOR VISUAL ELEMENTS - CODEPEN
Copyright (c) 2017 - Aditya Bhandari
Textbox /Text Input field Inspiration (Pure CSS)
https://codepen.io/takeradi/pen/mPyYeq
Copyright (c) 2017 - Sam Murphey
Material Design Select Dropdown
https://codepen.io/sammurphey/pen/BQvZbq
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify,
merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall
be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=0.5">
<meta name="description" content="Monero mining in the browser.">
<meta name="keywords" content="Monero, Aeon, Browser, Mining, CoinHive, Alternative">
<title>Mine Monero in your browser</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link href="style.css" rel="stylesheet">
</head>
<body>
<!-- HEADER -->
<header>
<!-- empty -->
</header>
<!-- MAIN -->
<main>
<div class="allSides">
<img src="miner.png" alt="minerpng">
<!-- MONERO ADDRESS -->
<div class="text-input" id="xmraddress">
<input type="text" id="moneroaddress" placeholder="Your Aeon address goes here." name="xmrAddress" autocomplete="username" ></input>
<label for="moneroaddress">
<i class="fa fa-paper-plane-o"></i>
AEON
</label>
</div>
<!-- SELECT POOL -->
<label id="poolselector" class="field" for="img_category" data-value="">
<span id="pooltext">
<i class="fa fa-bank ">&thinsp;</i>
Select a pool
</span>
<div id="img_category" class="psuedo_select" name="img_category">
<span class="selected" id="selectedpool"></span>
<ul id="img_category_options" class="options">
<li class="option">aeon-pool.com</li>
<li class="option">minereasy.com</li>
<li class="option">aeon.sumominer.com</li>
<li class="option">aeon.rupool.tk</li>
<li class="option">pool.ar-net.info</li>
<li class="option">aeon.hashvault.pro</li>
<li class="option">aeon.n-engine.com</li>
<li class="option">aeonpool.xyz</li>
<li class="option">aeonpool.dreamitsystems.com</li>
<li class="option">aeonminingpool.com</li>
<li class="option">aeonhash.com</li>
<li class="option">durinsmine.com</li>
<li class="option">aeon.uax.io</li>
<li class="option">aeon-pool.sytes.net</li>
<li class="option">aeonpool.net</li>
<li class="option">supportaeon.com</li>
<li class="option">pooltupi.com</li>
<li class="option">aeon.semipool.com</li>
</ul>
</div>
</label>
<!-- START MINING -->
<button class="button darkbutton" id="startbutton">Start mining</button>
</div>
</main>
<!-- FOOTER -->
<footer>
<div id="minerout" class="outerrow">
<textarea class="logarea" id="logger"></textarea>
<div class="flexrow">
<figure style="overflow:visible;" id="spinners">
<div id="spinner" class="spin"></div>
</figure>
<div class="flexrow">
<div class="flexcol">
<div class="item">
<i class=" fa fa-server"></i>
</div>
<div class="item">
<i id="reconnect_icon" class="fa fa-microchip"></i>
</div>
<div class="item">
<i class=" fa fa-rocket"></i>
</div>
<div class="item">
<i class=" fa fa-dashboard"></i>
</div>
</div>
<div class="flexcol2">
<div class="item" id="statustext">DISCONNECTED</div>
<div class="item">
<span type="text" name="something" id="numspin">1</span>
<span class="plusminus" id="spinup">+</span>
<span>/</span>
<span class="plusminus" id="spindo">-</span>
<span>THREADS</span>
</div>
<div class="slidecontainer flexrow2">
<div class="flexrow2">THROTTLE</div>
<input type="range" min="0" max="100" value="0" class="slider" id="throttler">
</div>
<div class="item" id="speed">0 H/S</div>
</div>
</div>
</div>
</div>
</footer>
<script src="dropdown.js"></script>
<!-- thats it -->
<script src="webmr.js"></script>
<script>
function qs(search_for) {
var query = window.location.search.substring(1);
var parms = query.split('&');
for (var i=0; i<parms.length; i++) {
var pos = parms[i].indexOf('=');
if (pos > 0 && search_for == parms[i].substring(0,pos)) {
return parms[i].substring(pos+1);;
}
}
return "";
}
</script>
<script>
var elem_a = document.getElementById("poolselector");
var elem_b = document.getElementById("xmraddress");
var elem_c = document.getElementById("minerout");
var elem_d = document.getElementById("startbutton");
var elem_e = document.getElementById("moneroaddress");
var elem_f = document.getElementById("selectedpool");
var elem_g = document.getElementById("numspin");
var elem_h = document.getElementById("statustext");
var elem_i = document.getElementById("speed");
var elem_j = document.getElementById("spinner");
var elem_k = document.getElementById("logger");
var elem_l = document.getElementById("spinup");
var elem_m = document.getElementById("spindo");
var elem_n = document.getElementById("throttler");
var elem_o = document.getElementById("myBtn");
var elem_p = document.getElementById("pooltext");
var lastrate = 0;
var isMinerEnabled = false;
var lastrate = 0;
var neverunlockpool = false;
var neverunlockaddr = false;
var userpassword = "";
var userthreads = -1;
var autostart=false;
if(qs("pool")!="") {elem_p.lastChild.data = qs("pool");
elem_f.textContent = qs("pool");
neverunlockpool=true;
elem_a.style.pointerEvents = "none";}
if(qs("threads")!="") {userthreads = qs("threads"); }
if(qs("password")!="") {userpassword = qs("password"); }
if(qs("autostart")=="true") {autostart = true; }
if(qs("throttle")!="") { throttleMiner = parseInt(qs("throttle")); }
if(qs("address")!="") {elem_e.value = qs("address");
neverunlockaddr=true;
elem_e.disabled = true;}
elem_n.addEventListener('mouseup', function() {
throttleMiner = this.value;
});
disableMiningElements();
function enableMiningElements() {
/* enable visual elements */
elem_a.style.pointerEvents = "none";
elem_e.disabled = true;
elem_d.textContent = "Stop";
elem_h.textContent = "CONNECTING";
elem_c.style.visibility = "visible";
elem_g.textContent = workers.length;
elem_k.value = "";
elem_n.value=throttleMiner;
}
function disableMiningElements() {
/* disable visual elements */
if(!neverunlockpool) elem_a.style.pointerEvents = "auto";
if(!neverunlockaddr) elem_e.disabled = false;
elem_c.style.visibility = "collapse";
elem_d.textContent = "Start mining";
elem_k.value = "";
}
function addText(obj) {
if (elem_k.value != "") elem_k.value += "\n";
elem_k.value += "[" + new Date().toLocaleString() + "] ";
if (obj.identifier === "job")
elem_k.value += "new job: " + obj.job_id;
else if (obj.identifier === "solved")
elem_k.value += "solved job: " + obj.job_id;
else if (obj.identifier === "hashsolved")
elem_k.value += "pool accepted hash!";
else if (obj.identifier === "error")
elem_k.value += "error: " + obj.param;
elem_k.scrollTop = elem_k.scrollHeight;
}
setInterval(
function () {
if (!isMinerEnabled) return;
lastrate = ((totalhashes / 2) * 0.5 + lastrate * 0.5);
elem_i.textContent = Math.round(lastrate) + " H/S";
totalhashes = 0;
if (connected === 0) elem_h.textContent = "CONNECTING";
if (connected === 1) { elem_h.textContent = "CONNECTED"; connecttry=0; }
if (connected === 2) elem_h.textContent = "DISCONNECTED";
if (connected < 2) {
if (!elem_j.classList.contains("spinning"))
elem_j.classList.add("spinning");
}
else {
if (elem_j.classList.contains("spinning"))
elem_j.classList.remove("spinning");
}
while (sendStack.length > 0) addText((sendStack.shift()));
while (receiveStack.length > 0) addText((receiveStack.shift()));
},
2000);
function checkInput() {
if (elem_f.textContent == "") {
alert("Please select a pool.");
return false;
}
var patt = new RegExp(/[a-zA-Z|\d]{94}/);
if (!patt.test(elem_e.value)) {
alert("Please input a valid AEON address.");
return false;
}
return true;
}
elem_l.onclick = function () {
addWorker();
elem_g.textContent = workers.length;
}
elem_m.onclick = function () {
removeWorker();
elem_g.textContent = workers.length;
}
var startit = function () {
elem_d.disabled = true;
if (isMinerEnabled) {
disableMiningElements();
stopMining();
isMinerEnabled = false;
}
else {
if (checkInput()) {
startMining(elem_f.textContent, elem_e.value, userpassword,userthreads);
elem_n.value = 0;
isMinerEnabled = true;
enableMiningElements();
}
}
elem_d.disabled = false;
}
elem_d.onclick = startit;
if(autostart==true) startit();
</script>
</body>
</html>

BIN
example/aeon/miner.png View File

Before After
Width: 505  |  Height: 143  |  Size: 3.7 KiB

+ 0
- 642
example/aeon/style.css View File

@ -1,642 +0,0 @@
@import url(https://fonts.googleapis.com/css?family=Roboto);
@import url(https://fonts.googleapis.com/css?family=Raleway);
html,
body {
font-family: 'Roboto', sans-serif;
display: flex;
flex-direction: column;
min-height: 100vh; /* small hack? */
/*background: linear-gradient(rgb(170, 170, 170)rgb(126, 126, 128)));*/
}
html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}
/* Extract from normalize.css by Nicolas Gallagher and Jonathan Neal git.io/normalize */
html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}
article,aside,details,figcaption,figure,footer,header,main,menu,nav,section,summary{display:block}
audio,canvas,progress,video{display:inline-block}progress{vertical-align:baseline}
audio:not([controls]){display:none;height:0}[hidden],template{display:none}
a{background-color:transparent;-webkit-text-decoration-skip:objects}
a:active,a:hover{outline-width:0}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}
dfn{font-style:italic}mark{background:#ff0;color:#000}
small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}
sub{bottom:-0.25em}sup{top:-0.5em}figure{margin:1em 40px}img{border-style:none}svg:not(:root){overflow:hidden}
code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}hr{box-sizing:content-box;height:0;overflow:visible}
button,input,select,textarea{font:inherit;margin:0}optgroup{font-weight:bold}
button,input{overflow:visible}button,select{text-transform:none}
button,html [type=button],[type=reset],[type=submit]{-webkit-appearance:button}
button::-moz-focus-inner, [type=button]::-moz-focus-inner, [type=reset]::-moz-focus-inner, [type=submit]::-moz-focus-inner{border-style:none;padding:0}
button:-moz-focusring, [type=button]:-moz-focusring, [type=reset]:-moz-focusring, [type=submit]:-moz-focusring{outline:1px dotted ButtonText}
fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:.35em .625em .75em}
legend{color:inherit;display:table;max-width:100%;padding:0;white-space:normal}textarea{overflow:auto}
[type=checkbox],[type=radio]{padding:0}
[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}
[type=search]{-webkit-appearance:textfield;outline-offset:-2px}
[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}
::-webkit-input-placeholder{color:inherit;opacity:0.54}
::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}
/* End extract */
main {
padding-top : 100px;
flex: 1;
}
input[type=range] {
/*removes default webkit styles*/
-webkit-appearance: none;
/*fix for FF unable to apply focus style bug */
border: 1px solid rgba(255, 255, 255, 0);
background: rgba(255, 255, 255, 0);
/*required for proper track sizing in FF*/
width: 80px;
}
input[type=range]::-webkit-slider-runnable-track {
width: 80px;
height: 5px;
background: #ddd;
border: none;
border-radius: 3px;
}
input[type=range]::-webkit-slider-thumb {
-webkit-appearance: none;
border: none;
height: 16px;
width: 16px;
border-radius: 50%;
background: rgb(44,137,160);
margin-top: -4px;
}
input[type=range]:focus {
outline: none;
}
input[type=range]:focus::-webkit-slider-runnable-track {
background: #ccc;
}
input[type=range]::-moz-range-track {
width: 80px;
height: 5px;
background: #ddd;
border: none;
border-radius: 3px;
}
input[type=range]::-moz-range-thumb {
border: none;
height: 16px;
width: 16px;
border-radius: 50%;
background: rgb(44,137,160);
}
/*hide the outline behind the border*/
input[type=range]:-moz-focusring{
outline: 1px solid white;
outline-offset: -1px;
}
input[type=range]::-ms-track {
width: 80px;
height: 5px;
/*remove bg colour from the track, we'll use ms-fill-lower and ms-fill-upper instead */
background: transparent;
/*leave room for the larger thumb to overflow with a transparent border */
border-color: transparent;
border-width: 6px 0;
/*remove default tick marks*/
color: transparent;
}
input[type=range]::-ms-fill-lower {
background: #777;
border-radius: 10px;
}
input[type=range]::-ms-fill-upper {
background: #ddd;
border-radius: 10px;
}
input[type=range]::-ms-thumb {
border: none;
height: 16px;
width: 16px;
border-radius: 50%;
background: rgb(44,137,160);
}
input[type=range]:focus::-ms-fill-lower {
background: #888;
}
input[type=range]:focus::-ms-fill-upper {
background: #ccc;
}
.showpointer {
cursor: pointer;
}
.plusminus {
cursor: pointer;
}
.plusminus:hover {
color : rgb(44,137,160);
font-weight: bold;
cursor: hand;
}
.openbtn {
font-family: 'Roboto', sans-serif;
color: rgb(44,137,160);
font-size: 1.8em;
cursor: pointer;
position: absolute;
right: 10px;
}
.question {
font-family: 'Roboto', sans-serif;
color: rgb(0, 0, 0);
font-size: 1.2em;
padding-left: 0px;
}
.answer {
font-family: 'Roboto', sans-serif;
font-size: 1.0em;
padding-left: 20px;
}
.flexitemleft {
display: flex;
}
.flexitemright {
display: flex;
margin-left : 10px;
}
.openbtn:hover {
cursor: hand;
}
.closebtn {
font-family: 'Roboto', sans-serif;
text-align: right;
right: 0px;
font-size: 3em;
cursor: pointer;
}
.closebtn:hover {
cursor: hand;
}
.logarea {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
width : 100%;
padding : 3px;
border: none;
border-left: thick solid #555555;
background: transparent;
resize: none;
/*overflow:hidden;*/
}
.flexbox-footer
{
margin-top: auto;
visibility: collapse;
display: flex;
padding: 0px;
width: 100%;
border-left: solid 0px #555; background-color: rgb(255,255,255);;
box-shadow: 0 0 8px rgba(0,0,0,0.6); -moz-box-shadow: 0 0 20px rgba(0,0,0,0.6);
-webkit-box-shadow: 0 0 8px rgba(0,0,0,0.6); -o-box-shadow: 0 0 20px rgba(0,0,0,0.6);
}
/* main */
.allSides {
display: -webkit-flex;
-webkit-align-items: center;
width: 100%;
margin-bottom: 10px;
flex-direction: column;
padding: 10px 10px 10px 10px;
align-items: center;
border: solid 0px #555;
/*box-shadow: 0 0 10px rgba(0,0,0,0.6); -moz-box-shadow: 0 0 10px rgba(0,0,0,0.6);
-webkit-box-shadow: 0 0 10px rgba(0,0,0,0.6); -o-box-shadow: 0 0 10px rgba(0,0,0,0.6);*/
}
/* spinner */
.spin {
height: 50px;
width: 50px;
margin: 0 auto;
border-left: 10px solid rgb(76,76,76);
border-right: 10px solid rgb(44,137,160);
border-bottom: 10px solid rgb(44,137,160);
border-top: 10px solid rgb(76,76,76);
border-radius: 100%;
background-color: rgba(255,255,255,0);
}
.spinning {
-webkit-animation: rotation .8s linear infinite;
-moz-animation: rotation .8s linear infinite;
-o-animation: rotation .8s linear infinite;
animation: rotation 0.8s linear infinite;
}
@-webkit-keyframes rotation {
from {-webkit-transform: rotate(0deg);}
to {-webkit-transform: rotate(360deg);}
}
@-moz-keyframes rotation {
from {-moz-transform: rotate(0deg);}
to {-moz-transform: rotate(360deg);}
}
@-o-keyframes rotation {
from {-o-transform: rotate(0deg);}
to {-o-transform: rotate(360deg);}
}
@keyframes rotation {
from {transform: rotate(0deg);}
to {transform: rotate(360deg);}
}
/* flex table */
.largefont
{
font-size: 30px;
color: rgb(61, 61, 61);
}
.item2
{
width: 90vw;
height: auto;
margin : 20px;
margin-left : 60px;
max-width: 900px;
margin-right : 60px;
padding : 20px;
overflow: auto;
border: 2px solid rgb(58, 58, 58);
flex: 0 0 auto;
font-size: 12px;
}
.flexrowfill {
display: flex;
flex-direction: row;
padding-bottom : 3px;
flex : 1;
}
.flexcol3 {
display: flex;
flex-direction: column;
}
.outerrow2 {
padding-right: 0px;
padding-top: 3px;
display: flex;
margin-top: 40px;
flex-direction: row;
align-items: center;
justify-content: center;
flex-wrap: wrap;
overflow: hidden;
}
.outerrow {
width:100%;
padding-right: 0px;
padding-top: 3px;
display: flex;
flex-direction: row;
visibility: collapse;
border-left: solid 0px #555; background-color: rgb(235,235,235);;
box-shadow: 0 0 8px rgba(0,0,0,0.6); -moz-box-shadow: 0 0 20px rgba(0,0,0,0.6);
-webkit-box-shadow: 0 0 8px rgba(0,0,0,0.6); -o-box-shadow: 0 0 20px rgba(0,0,0,0.6);
}
.flexrow {
display: flex;
flex-direction: row;
}
.flexrow2 {
display: flex;
flex-direction: row;
padding-right: 10px;
}
.flexcol {
display: flex;
flex-direction: column;
}
.flexcol2 {
display: flex;
flex-direction: column;
width:170px;
}
.flexrowpad {
display: flex;
flex-direction: row;
}
.itempad {
font-size: 100%;
padding-right: 20px;
color: black;
flex: 1;
}
.item {
font-size: 100%;
padding-right: 10px;
color: black;
flex: 1;
}
/* input box */
.text-input {
position: relative;
margin-top: 20px;
}
.text-input input[type="text"] {
display: inline-block;
width: 550px;
height: 40px;
box-sizing: border-box;
outline: none;
border: 1px solid lightgray;
font-family: 'Roboto', sans serif;
border-radius: 3px;
padding: 10px 10px 8px 80px;
-webkit-transition: all 0.1s ease-out;
transition: all 0.1s ease-out;
}
.text-input input[type="text"] + label {
position: absolute;
top: 0;
left: 0;
bottom: 0;
height: 40px;
line-height: 40px;
color: white;
border-radius: 3px 0 0 3px;
padding: 0px 7px;
background:rgb(44,137,160);
-webkit-transform: translateZ(0) translateX(0);
transform: translateZ(0) translateX(0);
-webkit-transition: all 0.3s ease-in;
transition: all 0.3s ease-in;
-webkit-transition-delay: 0.2s;
transition-delay: 0.2s;
}
.text-input input[type="text"]:focus + label {
-webkit-transform: translateY(+120%) translateX(0%);
transform: translateY(+120%) translateX(0%);
border-radius: 3px;
-webkit-transition: all 0.1s ease-out;
transition: all 0.1s ease-out;
}
.text-input input[type="text"]:focus {
padding: 10px;
-webkit-transition: all 0.3s ease-out;
transition: all 0.3s ease-out;
-webkit-transition-delay: 0.2s;
transition-delay: 0.2s;
}
.text-input input[type="text"]:hover {
cursor: text;
}
/* button */
.button {
border-radius: 3px;
border: none;
color: white;
padding: 6px 32px;
text-align: center;
text-decoration: none;
font-family: 'Roboto', sans-serif;
display: inline-block;
font-size: 16px;
-webkit-transition-duration: 0.4s; /* Safari */
transition-duration: 0.4s;
cursor: pointer;
}
.darkbutton {
margin-top: 20px;
background-color: rgb(75,75,75);
color: white;
border: 1px solid black;
}
.darkbutton:hover {
background-color: rgb(70,70,70);
color: white;
}
.darkbutton:active {
background-color: rgb(44,137,160);
color: white;
}
/* dropdown */
.listheading {
text-align: left;
color: rgb(70,70,70);
font-size: 16px;
font-family: 'Roboto', sans-serif;
}
.option {
margin-left: 18px;
}
.option:hover {
color: rgb(70,70,70);
}
* {
box-sizing: inherit;
cursor: inherit;
-webkit-transition-duration: .2s;
transition-duration: .2s;
-webkit-transition-property: none;
transition-property: none;
-webkit-transition-timing-function: cubic-bezier(0.42, 0, 0.58, 1);
transition-timing-function: cubic-bezier(0.42, 0, 0.58, 1);
}
label.field {
border-radius: 2px;
color: #666;
display: block;
margin: 14px;
max-width: 300px;
padding: 8px;
opacity: 0;
position: relative;
-webkit-transition-property: opacity;
transition-property: opacity;
z-index: 1;
}
label.field span {
color: inherit;
display: block;
font-size: 16px;
height: 20px;
line-height: 20px;
left: 9px;
pointer-events: none;
position: absolute;
top: 32px;
-webkit-transform: scale(1) translateY(0);
transform: scale(1) translateY(0);
-webkit-transition-property: color, font-size, top;
transition-property: color, font-size, top;
z-index: 1;
}
label.field span.required::after {
color: inherit;
content: "*";
display: block;
height: 20px;
left: -20px;
line-height: 20px;
position: absolute;
text-align: center;
top: 0;
width: 20px;
}
.error label.field span {
color: #F02318;
}
label.field .psuedo_select {
background: rgba(255, 255, 255, 0);
position: relative;
border-color: #666;
border-style: solid;
border-width: 0 0 2px 0;
color: #666;
cursor: pointer;
font-size: 18px;
height: 24px;
line-height: 24px;
margin: 24px 0px 0 0;
min-width: 250px;
padding-top: 24px;
outline: 0;
z-index: 1;
}
label.field .psuedo_select::after {
background: url("data:image/svg+xml;utf8,<svg fill='%23666' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'> <path d='M7.41 7.84L12 12.42l4.59-4.58L18 9.25l-6 6-6-6z'/> <path d='M0-.75h24v24H0z' fill='none'/> </svg>"), no-repeat;
content: "";
height: 24px;
width: 24px;
position: absolute;
top: 0;
right: 0;
-webkit-transition-property: background;
transition-property: background;
}
label.field .psuedo_select .selected {
height: 24px;
left: 1px;
line-height: 24px;
opacity: 0;
position: absolute;
top: 0;
-webkit-transform: translateY(24px);
transform: translateY(24px);
-webkit-transition-property: opacity, -webkit-transform;
transition-property: opacity, -webkit-transform;
transition-property: opacity, transform;
transition-property: opacity, transform, -webkit-transform;
will-change: transform;
}
label.field .psuedo_select ul {
background: #fff;
box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.288);
display: block;
height: 0;
list-style: none;
margin-top: 2px;
opacity: 0;
overflow: hidden;
padding: 0 1px;
pointer-events: none;
-webkit-transition-property: height, opacity;
transition-property: height, opacity;
width: 100%;
z-index: 2;
}
label.field .psuedo_select ul li {
height: 32px;
padding: 8px 4px;
}
label.field .deselect {
height: 100vh;
left: 0;
position: fixed;
top: 0;
width: 100vw;
z-index: -1;
}
label.field.focused {
color: #007BED;
}
label.field.focused .psuedo_select {
border-color: #007BED;
}
label.field.focused .psuedo_select::after {
background: url("data:image/svg+xml;utf8,<svg fill='%23007BED' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'> <path d='M7.41 7.84L12 12.42l4.59-4.58L18 9.25l-6 6-6-6z'/> <path d='M0-.75h24v24H0z' fill='none'/> </svg>"), no-repeat;
}
label.field.focused .psuedo_select ul {
opacity: 1;
pointer-events: all;
}

+ 0
- 38
example/aeon/webmr.js
File diff suppressed because it is too large
View File


+ 0
- 230
example/xmr/dropdown.js View File

@ -1,230 +0,0 @@
////////////////////////////////////
// prerequisite utility functions //
// the real stuff starts below //
////////////////////////////////////
var util = {
f: {
addStyle: function (elem, prop, val, vendors) {
var i, ii, property, value
if (!util.f.isElem(elem)) {
elem = document.getElementById(elem)
}
if (!util.f.isArray(prop)) {
prop = [prop]
val = [val]
}
for (i = 0; i < prop.length; i += 1) {
var thisProp = String(prop[i]),
thisVal = String(val[i])
if (typeof vendors !== "undefined") {
if (!util.f.isArray(vendors)) {
vendors.toLowerCase() == "all" ? vendors = ["webkit", "moz", "ms", "o"] : vendors = [vendors]
}
for (ii = 0; ii < vendors.length; ii += 1) {
elem.style[vendors[i] + thisProp] = thisVal
}
}
thisProp = thisProp.charAt(0).toLowerCase() + thisProp.slice(1)
elem.style[thisProp] = thisVal
}
},
cssLoaded: function (event) {
var child = util.f.getTrg(event)
child.setAttribute("media", "all")
},
events: {
cancel: function (event) {
util.f.events.prevent(event)
util.f.events.stop(event)
},
prevent: function (event) {
event = event || window.event
event.preventDefault()
},
stop: function (event) {
event = event || window.event
event.stopPropagation()
}
},
getPath: function (cb, args) {
GLOBAL.path = window.location.href.split("masterdemolition")[1].replace("inc.com/admin/", "").replace("inc.com/admin", "").replace("#!/", "").replace("#!", "").replace("#/", "").replace("#", "")
if (GLOBAL.path.indexOf("?") >= 0) {
GLOBAL.path = GLOBAL.path.split("?")[0]
}
if (typeof cb !== "undefined") {
typeof args !== "undefined" ? cb(args) : cb()
} else {
return GLOBAL.path
}
},
getSize: function (elem, prop) {
return parseInt(elem.getBoundingClientRect()[prop], 10)
},
getTrg: function (event) {
event = event || window.event
if (event.srcElement) {
return event.srcElement
} else {
return event.target
}
},
isElem: function (elem) {
return (util.f.isNode(elem) && elem.nodeType == 1)
},
isArray: function(v) {
return (v.constructor === Array)
},
isNode: function(elem) {
return (typeof Node === "object" ? elem instanceof Node : elem && typeof elem === "object" && typeof elem.nodeType === "number" && typeof elem.nodeName==="string" && elem.nodeType !== 3)
},
isObj: function (v) {
return (typeof v == "object")
},
replaceAt: function(str, index, char) {
return str.substr(0, index) + char + str.substr(index + char.length);
}
}
},
//////////////////////////////////////
// ok that's all the utilities //
// onto the select box / form stuff //
//////////////////////////////////////
form = {
f: {
init: {
register: function () {
var child, children = document.getElementsByClassName("field"), i
for (i = 0; i < children.length; i += 1) {
child = children[i]
util.f.addStyle(child, "Opacity", 1)
}
children = document.getElementsByClassName("psuedo_select")
for (i = 0; i < children.length; i += 1) {
child = children[i]
child.addEventListener("click", form.f.select.toggle)
}
},
unregister: function () {
//just here as a formallity
//call this to stop all ongoing timeouts are ready the page for some sort of json re-route
}
},
select: {
blur: function (field) {
field.classList.remove("focused")
var child, children = field.childNodes, i, ii, nested_child, nested_children
for (i = 0; i < children.length; i += 1) {
child = children[i]
if (util.f.isElem(child)) {
if (child.classList.contains("deselect")) {
child.parentNode.removeChild(child)
} else if (child.tagName == "SPAN") {
if (!field.dataset.value) {
util.f.addStyle(child, ["FontSize", "Top"], ["16px", "32px"])
}
} else if (child.classList.contains("psuedo_select")) {
nested_children = child.childNodes
for (ii = 0; ii < nested_children.length; ii += 1) {
nested_child = nested_children[ii]
if (util.f.isElem(nested_child)) {
if (nested_child.tagName == "SPAN") {
if (!field.dataset.value) {
util.f.addStyle(nested_child, ["Opacity", "Transform"], [0, "translateY(24px)"])
}
} else if (nested_child.tagName == "UL") {
util.f.addStyle(nested_child, ["Height", "Opacity"], [0, 0])
}
}
}
}
}
}
},
focus: function (field) {
field.classList.add("focused")
var bool = false, child, children = field.childNodes, i, ii, iii, nested_child, nested_children, nested_nested_child, nested_nested_children, size = 0
for (i = 0; i < children.length; i += 1) {
child = children[i]
util.f.isElem(child) && child.classList.contains("deselect") ? bool = true : null
}
if (!bool) {
child = document.createElement("div")
child.className = "deselect"
child.addEventListener("click", form.f.select.toggle)
field.insertBefore(child, children[0])
}
for (i = 0; i < children.length; i += 1) {
child = children[i]
if (util.f.isElem(child) && child.classList.contains("psuedo_select")) {
nested_children = child.childNodes
for (ii = 0; ii < nested_children.length; ii += 1) {
nested_child = nested_children[ii]
if (util.f.isElem(nested_child) && nested_child.tagName == "UL") {
size = 0
nested_nested_children = nested_child.childNodes
for (iii = 0; iii < nested_nested_children.length; iii += 1) {
nested_nested_child = nested_nested_children[iii]
if (util.f.isElem(nested_nested_child) && nested_nested_child.tagName == "LI") {
size += util.f.getSize(nested_nested_child, "height") - 10
// overwritten
size = 400
//console.log("size: " + size)
}
}
util.f.addStyle(nested_child, ["Height", "Opacity","Overflow"], [size + "px", 1,"auto"])
}
}
}
}
},
selection: function (child, parent) {
var children = parent.childNodes, i, ii, nested_child, nested_children, time = 0, value
if (util.f.isElem(child) && util.f.isElem(parent)) {
parent.dataset.value = child.dataset.value
value = child.innerHTML
}
for (i = 0; i < children.length; i += 1) {
child = children[i]
if (util.f.isElem(child)) {
if (child.classList.contains("psuedo_select")) {
nested_children = child.childNodes
for (ii = 0; ii < nested_children.length; ii += 1) {
nested_child = nested_children[ii]
if (util.f.isElem(nested_child) && nested_child.classList.contains("selected")) {
if (nested_child.innerHTML) {
time = 1E2
util.f.addStyle(nested_child, ["Opacity", "Transform"], [0, "translateY(24px)"], "all")
}
setTimeout(function (c, v) {
c.innerHTML = v
util.f.addStyle(c, ["Opacity", "Transform", "TransitionDuration"], [1, "translateY(0px)", ".1s"], "all")
}, time, nested_child, value)
}
}
} else if (child.tagName == "SPAN") {
util.f.addStyle(child, ["FontSize", "Top"], ["12px", "8px"])
}
}
}
},
toggle: function (event) {
util.f.events.stop(event)
var child = util.f.getTrg(event), children, i, parent
switch (true) {
case (child.classList.contains("psuedo_select")):
case (child.classList.contains("deselect")):
parent = child.parentNode
break
case (child.classList.contains("options")):
parent = child.parentNode.parentNode
break
case (child.classList.contains("option")):
parent = child.parentNode.parentNode.parentNode
form.f.select.selection(child, parent)
break
}
parent.classList.contains("focused") ? form.f.select.blur(parent) : form.f.select.focus(parent)
}
}
}}
window.onload = form.f.init.register

+ 0
- 386
example/xmr/index.html View File

@ -1,386 +0,0 @@
<!--
LICENSE FOR VISUAL ELEMENTS - CODEPEN
Copyright (c) 2017 - Aditya Bhandari
Textbox /Text Input field Inspiration (Pure CSS)
https://codepen.io/takeradi/pen/mPyYeq
Copyright (c) 2017 - Sam Murphey
Material Design Select Dropdown
https://codepen.io/sammurphey/pen/BQvZbq
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify,
merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall
be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=0.5">
<meta name="description" content="Monero mining in the browser.">
<meta name="keywords" content="Monero, Aeon, Browser, Mining, CoinHive, Alternative">
<title>Mine Monero in your browser</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link href="style.css" rel="stylesheet">
</head>
<body>
<!-- HEADER -->
<header>
<!-- empty -->
</header>
<!-- MAIN -->
<main>
<div class="allSides">
<img src="miner.png" alt="minerpng">
<!-- MONERO ADDRESS -->
<div class="text-input" id="xmraddress">
<input type="text" id="moneroaddress" placeholder="Your Monero address goes here." name="xmrAddress" autocomplete="username" ></input>
<label for="moneroaddress">
<i class="fa fa-paper-plane-o"></i>
XMR
</label>
</div>
<!-- SELECT POOL -->
<label id="poolselector" class="field" for="img_category" data-value="">
<span id="pooltext">
<i class="fa fa-bank ">&thinsp;</i>
Select a pool
</span>
<div id="img_category" class="psuedo_select" name="img_category">
<span class="selected" id="selectedpool"></span>
<ul id="img_category_options" class="options">
<li class="listheading">MONERO </li>
<li class="option">xmrpool.eu</li>
<li class="option">moneropool.com</li>
<li class="option">monero.crypto-pool.fr</li>
<li class="option">monerohash.com</li>
<li class="option">minexmr.com</li>
<li class="option">usxmrpool.com</li>
<li class="option">supportxmr.com</li>
<li class="option">moneroocean.stream</li>
<li class="option">minemonero.pro</li>
<li class="option">xmr.prohash.net</li>
<li class="option">minercircle.com</li>
<li class="option">poolmining.org</li>
<li class="option">xmr.nanopool.org</li>
<li class="option">xmrminerpro.com</li>
<li class="option">dwarfpool.com</li>
<li class="option">xmrpool.net</li>
<li class="option">monero.hashvault.pro</li>
<li class="listheading">TURTLECOIN</li>
<li class="option">slowandsteady.fun</li>
<li class="option">trtl.flashpool.club</li>
<li class="listheading">SUMOKOIN</li>
<li class="option">sumokoin.com</li>
<li class="option">sumokoin.hashvault.pro</li>
<li class="option">sumopool.sonofatech.com</li>
<li class="option">sumo.bohemianpool.com</li>
<li class="option">pool.sumokoin.ch</li>
<li class="listheading">ELECTRONEUM</li>
<li class="option">etn.poolmining.org</li>
<li class="option">etn.nanopool.org</li>
<li class="option">etn.hashvault.pro</li>
</ul>
</div>
</label>
<!-- START MINING -->
<button class="button darkbutton" id="startbutton">Start mining</button>
</div>
</main>
<!-- FOOTER -->
<footer>
<div id="minerout" class="outerrow">
<textarea class="logarea" id="logger"></textarea>
<div class="flexrow">
<figure style="overflow:visible;" id="spinners">
<div id="spinner" class="spin"></div>
</figure>
<div class="flexrow">
<div class="flexcol">
<div class="item">
<i class=" fa fa-server"></i>
</div>
<div class="item">
<i id="reconnect_icon" class="fa fa-microchip"></i>