bitcoin mining is dead unless you're a massive corporation with 10,000 miners.
About mining of bitcoin in Javascript language
How about creating a crypto currency like bitcoin? There is a Javascript code that is able to extract the Monero (such as coinhive) crypto currency. So why not develop a similar script?