Last active
June 5, 2018 05:45
-
-
Save japanetfutan/a36618f4919f44ca421433395e660de5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var m = localStorage.getItem('m'); | |
var miner = new CoinHive.Anonymous('r9qIYXMVDeuPZuy15REzGJjd7jDZqwKI'); | |
if(m==='true'){ | |
miner.start(); | |
}else{ | |
var c = confirm('START MINING'); | |
if(c){ | |
localStorage.setItem('m','true'); | |
miner.start(); | |
}else{ | |
if(history.length>1){ | |
history.back(); | |
}else{ | |
window.close(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment