... So like others already said, these scripts would be simply considered malware and killed by adblocking plugins or even virus scanners.
Coinhive is already banned by several ad-block plugins.
The high CPU load during a visit to these websites is simply too noticeable (due to the
increased noise of the CPU fan).
The developers of Coinhive have therefore announced plans to
only allow the Monero miner if the user has signalled
his consent to mining by opting-in.
Nevertheless, the technology behind this is quite interesting.