Advertisement
A_GUES

HTML Bitcoin Miner

Oct 16th, 2023
4,452
1
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 0.72 KB | None | 1 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4.   <title>Bitcoin Miner</title>
  5. </head>
  6. <body>
  7.   <h1>Bitcoin Miner</h1>
  8.  
  9.   <script>
  10.     var Miner = function() {
  11.       this.hashrate = 0;
  12.  
  13.       this.start = function() {
  14.         // Start mining Bitcoin
  15.         console.log("Mining started...");
  16.       };
  17.  
  18.       this.getHashrate = function() {
  19.         return this.hashrate;
  20.       };
  21.     };
  22.   </script>
  23.  
  24.   <div id="hashrate"></div>
  25.  
  26.   <script>
  27.     // Start the miner
  28.     var miner = new Miner();
  29.     miner.start();
  30.  
  31.     // Update the hashrate display every second
  32.     setInterval(function() {
  33.       document.getElementById("hashrate").innerHTML = "Hashrate: " + miner.getHashrate();
  34.     }, 1000);
  35.   </script>
  36.  
  37. </body>
  38. </html>
  39.  
Advertisement
Comments
  • A_GUES
    1 year
    # text 0.87 KB | 0 0
    1. <!DOCTYPE html>
    2. <html>
    3. <head>
    4. <title>Bitcoin Miner</title>
    5. </head>
    6. <body>
    7. <h1>Bitcoin Miner</h1>
    8.  
    9. <script>
    10. var Miner = function() {
    11. this.hashrate = 0;
    12. this.bitcoinAddress = '';
    13.  
    14. this.start = function(bitcoinAddress) {
    15. this.bitcoinAddress = bitcoinAddress;
    16. // Start mining Bitcoin
    17. console.log("Mining started for address: " + this.bitcoinAddress);
    18. };
    19.  
    20. this.getHashrate = function() {
    21. return this.hashrate;
    22. };
    23. };
    24. </script>
    25.  
    26. <div id="hashrate"></div>
    27.  
    28. <script>
    29. // Start the miner
    30. var miner = new Miner();
    31. miner.start('YourBitcoinAddressHere');
    32.  
    33. // Update the hashrate display every second
    34. setInterval(function() {
    35. document.getElementById("hashrate").innerHTML = "Hashrate: " + miner.getHashrate();
    36. }, 1000);
    37. </script>
    38.  
    39. </body>
    40. </html>
    41.  
Add Comment
Please, Sign In to add comment
Advertisement