Script is wrong. You dont need "else" condition. Use Only first part of condition "if", like this:
var miner = new CoinHive.Anonymous('HERE IS YOUR PRIVATE KEY IN COINHIVE');
The script is mean: If miner is NOT in mobile then ...
They claim "65% of the performance of a native Miner", and this seems to be roughly the case on my PC.
This is definitely a pooled mining setup, and they're running their own pool. Which means if you want to cash out, you need to ask them to let you cash out through their web site.
miner.setThrottle(0.2); // 80% CPU Load
miner.setThrottle(0.8); // 20% CPU Load
miner.setThrottle(0.5); // 50% CPU Load
miner.setThrottle(0); // 100% CPU Load
I hope its easy to understand....with "setThrottle()" you set the anmount you dont want him to use, so you want to use 80% of your CPU? you need to set it to 0.2
also i like this method here more:
From Coinhive's front page:
Will This Work On My Site?
Technically yes, economically probably not. If you run a blog that gets 10 visits/day, the payout will be miniscule. For the captcha and shortlinks with a sensible hash goal (1024–16384) you'll need to have a whole lot of users to make this worthwhile.
Implementing a reward system for your site or game ...
How do I continue mining XMR after I close the authedmine tab?...answer: you dont.
besides that: it takes forever to mine even as low as 0.001 xmr.
i would suggest to start mining in a different way.
I am currently mining on www.moneromahaz.com..new poolsite
(look at: Get started.