JSFiddle - React, Tailwind, and code Playground
by sperske
HTML
<script src="http://zeroclipboard.org/javascripts/zc/ZeroClipboard_1.3.2.js"></script>
<button id='copy'>Calculate</button>
<br/>
<textarea placeholder="Paste Clipboard into this box to see this work"></textarea>
CSS
textarea {
width: 98%;
height: 100px;
}
JavaScript
var client = new ZeroClipboard(
$("#copy"), {
moviePath: "http://zeroclipboard.org/javascripts/zc/ZeroClipboard_1.3.2.swf"
});
client.on('dataRequested', function (client, args) {
client.setText((function () {
input = prompt("Enter your max KH/s.", "");
if (input == null || input == "") {
return;
}
share = 0.00000116414;
total = input * share;
alert('"'+input + " * " + share + " = " + total+'" copied to your clipboard');
return input + " * " + share + " = " + total;
})());
});