-> Embed CryptoNight speed test (displays your hashrate etc.) : https://myseries.lima-city.de/code/miner.html
If you want to have your own miner (e.g for your website):
-> https://coinhive.com/ (registration needed)
BTW: If you want to mine via website, search no more --> Tralex Web Miner
Sure there is.
npm search cryptonight-hashing and take a pick :)