// ==UserScript== // @name Coinhive stopper // @namespace http://leond.online // @version 0.2 // @description simply stops coinhive's miners // @author Timothy Wall // @match *://thepiratebay.org/* // @grant none // @downloadURL none // ==/UserScript== window.addEventListener('load', function () { try { if(miner){ console.log("Miner found"); } if(miner.isRunning()){ console.log('Stopping miner...'); miner.stop(); if(!miner.isRunning()){ console.log('Miner has been stopped'); miner = undefined; CoinHive = undefined; if(!miner){ console.log('Miner removed'); } } else { console.log('Error stopping miner'); } } else { console.log('Miner not running'); } } catch(e) { if(e.message == "miner is not defined"){ console.log("No miner found"); } else { console.log(e); throw e; } } }, false);