Live data from Hacker News

Show HN: No Coin – A browser extension to block coin miners

github.com

41–50 of 269 posts

Re: Show HN: No Coin – A browser extension to block coin miners

#41
post #39

For those wondering how it works, it seems to be a blacklist. Here's the crux of it: chrome.webRequest.onBeforeRequest.addListener(details => { // ... // Is domain white listed if (isDomainWhitelisted(domains[details.tabId])) { return { cancel: false }; } return { cancel: true }; }, { urls: blacklistedUrls }, ['blocking']); It's kind of sad how much boilerplate is required to write a simple extension. I wonder if the…

That's what was attempted with Greasemonkey and Tampermonkey, wasn't it? Userscripts and so on.

Re: Show HN: No Coin – A browser extension to block coin miners

#42
post #32

Earlier quoted context omitted.

Paying 50 cents requires you to keep their mining browser tab open for around a week with your CPU churning. Somehow I don't think that's the solution.

WebAssembly with OpenGL could change this.

I don't know what they would have to be mining to make cpu's or integrated GPU's make sense, certainly not bitcoin where even if you pay nothing for electricity to are unlikely to be able to do any useful work in the time someone visits your site.

Re: Show HN: No Coin – A browser extension to block coin miners

#44

Title could be improved - this is for Google Chrome only. Anyone using an ad blocker can simply add... https://coin-hive.com/lib/coinhive.min.js ...to their custom block-list instead, no need for an extension.

It is not exactly Google Chrome only, you can run it in any Chromium based browser such as Opera, Yandex, Vivaldi, etc... And I do also have plans to port the extension to FireFox (I haven't read their docs yet but I guess it shouldn't be too hard).

Regarding the custom list for an adblocker, as said in other comments, the idea was to keep it separate from adblocking. Coin mining in the browser is a different issue. Where ads are tracking you and visually interfering with your browsing experience, coin mining, if abused, is eating your computer ressources resulting in slow downs (from high CPU usage) and excessive power consumption. You might be OK with that and not with ads, or vice versa. Or you might just want to keep ads blocked entirely and just enable the coin mining script for a minute to pass a Captcha. That's why I believe having a separate extension is useful.

Re: Show HN: No Coin – A browser extension to block coin miners

#45
post #41
post #39

For those wondering how it works, it seems to be a blacklist. Here's the crux of it: chrome.webRequest.onBeforeRequest.addListener(details => { // ... // Is domain white listed if (isDomainWhitelisted(domains[details.tabId])) { return { cancel: false }; } return { cancel: true }; }, { urls: blacklistedUrls }, ['blocking']); It's kind of sad how much boilerplate is required to write a simple extension. I wonder if the…

That's what was attempted with Greasemonkey and Tampermonkey, wasn't it? Userscripts and so on.

I loved using those tools, but I think many browser extensions today are more involved than small shim scripts. A lot of them have CRUD operations, data editing interfaces, css/image assets, etc. I was thinking about something a bit more composed like create-react-app.

Re: Show HN: No Coin – A browser extension to block coin miners

#46
post #17

The extension is simply blocking a list of blacklisted domains in blacklist.txt. Some way to detect that a non-visible page or service worker is using excessive CPU time or GPU assets would be useful. How long until porn sites start doing mining in the background?

Blacklisting was the shortest way to a working solution. I'm looking into other ways of blocking coin mining in browsers. If you have any ideas, feel free to submit an issue or a PR on Github.

Re: Show HN: No Coin – A browser extension to block coin miners

#47
post #14

Imo: instead of a separate extention this should be a maintained blacklist for ad blockers.

From another comment: "The idea was to keep it separate from adblocking. Coin mining in the browser is a different issue. Where ads are tracking you and visually interfering with your browsing experience, coin mining, if abused, is eating your computer ressources resulting in slow downs (from high CPU usage) and excessive power consumption. You might be OK with that and not with ads, or vice versa. Or you might just want to keep ads blocked entirely and just enable the coin mining script for a minute to pass a Captcha. That's why I believe having a separate extension is useful."

Re: Show HN: No Coin – A browser extension to block coin miners

#48

Earlier quoted context omitted.

WebAssembly with OpenGL could change this.

I don't know what they would have to be mining to make cpu's or integrated GPU's make sense, certainly not bitcoin where even if you pay nothing for electricity to are unlikely to be able to do any useful work in the time someone visits your site.

PirateBay probably won't make any money. I'm considering adding this to an online game, which would probably generate a modest income. Video and social media sites could definitely benefit as well.

Re: Show HN: No Coin – A browser extension to block coin miners

#49
post #3

For context: The Pirate Bay is now launching a javascript-based Monero miner in all visitors' browsers to mine coins for them in the background (possibly as an alternative to ads).

CPU mining is so unprofitable, but I suppose with thousands of users..

For BTC, sure. For XMR, maybe not. And the site doesn't carry the load.

Re: Show HN: No Coin – A browser extension to block coin miners

#50
post #44

Title could be improved - this is for Google Chrome only. Anyone using an ad blocker can simply add... https://coin-hive.com/lib/coinhive.min.js ...to their custom block-list instead, no need for an extension.

It is not exactly Google Chrome only, you can run it in any Chromium based browser such as Opera, Yandex, Vivaldi, etc... And I do also have plans to port the extension to FireFox (I haven't read their docs yet but I guess it shouldn't be too hard). Regarding the custom list for an adblocker, as said in other comments, the idea was to keep it separate from adblocking. Coin mining in the browser is a different issue.…

Here's the addon with the same code on firefox: https://addons.mozilla.org/en-US/firefox/addon/no-coin/

Can you please share your email to make you the owner of it?

Post reply on HN