Good idea, but now most of the browsers had blockers for mining soft in js.
It shows warning message if JS code trying to run miner on client, users need to click OK or YES for this warning message.
This is not a problem. The site should inform the users that there is proof-of-work captcha replacement and the user should allow it to access the site or do other thing that bots should not do (login, sign up, post a message, forum search etc) with higher difficulty for things needing more security.
In some cases there should be an option to complete CAPTCHA instead of mining if, for example, users have very weak hardware.
I have already proposed this idea for Bitcointalk forum itself, please support it in the poll
https://bitcointalk.org/index.php?topic=3242646.0