As it's already pointed out by the news articles, the attackers were simply inserting the CoinHive script into the webpages, probably with a man-in-the-middle attack, which is something trivial enough for any website to do. A decent browser extension for it will do the trick, but you might also want to disable Javascript or switch to a privacy-oriented browser if you're really worried about it.
A sure way to check if your system is being exploited for mining is to keep an eye on your system resources and temperatures - Task manager for CPU usage and GPU monitoring depends on your hardware and operating system, although the latter doesn't matter for most laptops.