WordPress :: mine with user’s CPU

We are in 2020 and I was having a look at this post from 2018 which describes 3 WordPress plug-in we might use to mine Bitcoins through users CPU:

So it looks like there is nothing I can do, I have to do it by myself.

Is there any open source library that allows you to add a .js code to the header of your website and mine Bitcoin in 2020?

Why all Coin Hive are gone away? It looked like a legit way to make money to me, why they are all failed?