user516: "Bitcoin Plus" is one example of a javascript bitcoin mining client that can CPU mine bitcoins through a browser when viewing a website. Here is a screenshot from 4bitcoins dot com which automatically starts the miner when you load the page:

It could be considered a form of theft for a website to profit from the extra electricity used by a viewer of the page, and definitely isn't environmentally friendly as CPU mining through javascript is hugely inefficient and any revenue earned doesn't even come close to covering the cost of the electricity consumed (and besides, in this case the benefit is to the website, and the cost is to the user). 
Doing some quick maths I'd estimate that the mining would earn the website owner around 0.12 US cents per 24hrs running, at a cost of around 17 cents to the user in power (assumed 1BTC=$5US, difficulty around 1.8m, power 14c/kWh). 
In short, it's desirable to block such functionality from running without the user's consent.
How could such integrated mining be disabled without blanket-disabling javascript on all websites? Bear in mind that even though the miner is visible on 4bitcoins dot com, it doesn't need to be visible to work.
ps: I didn't use standard syntax for the website name, as that will only encourage search engines to send more traffic there!

user659: Using a selective JavaScript blocker is basic good practice from a system security point of view, and will prevent websites from using your CPU to mine for bitcoins.

The NoScript Firefox extension allows you to disable JavaScript on a per-site or per-page basis.  I like to set it to default to denying JavaScript on every page, and then add an exception for each page on which I want to allow JavaScript to run.
If you're using Chromium or Chrome then there's a built in Javascript blocker.  Go to the 'wrench' menu, select "Preferences", then "Under the bonnet" (or 'hood' if you speak American?) then click "Content Settings" in the "Privacy" section and select "Do not allow any site to run JavaScript".  Then whenever you're on a site which needs JavaScript to run, you'll see a red X at the right hand end of the address bar which you can click to allow JavaScript on just that site.
If you're using Internet Explorer you're probably not too concerned about what random strangers run on your computer.  Enjoy.


user27: It isn't really theft if you're broadcasting your availability to run javascripts. There are blockers that allow you to selectively block javascript files - check your browser's extensions (Chrome and FF both have many options).

user85: You would need some kind of browser plug-in that monitors the CPU consumption of JavaScript and alerts you if you see excessive usage for an extended period of time.

user50: You can use Adblock Plus to block the miner script.  In this case it would be:
http://www.bitcoinplus.com/js/miner.js


516: <p>"Bitcoin Plus" is one example of a javascript bitcoin mining client that can CPU mine bitcoins through a browser when viewing a website. Here is a screenshot from 4bitcoins dot com which automatically starts the miner when you load the page:
<img src="https://i.stack.imgur.com/yHt6M.jpg" alt="Bitcoin Plus running on 4bitcoins dot com"></p>

<p>It could be considered a form of theft for a website to profit from the extra electricity used by a viewer of the page, and definitely isn't environmentally friendly as CPU mining through javascript is hugely inefficient and any revenue earned doesn't even come close to covering the cost of the electricity consumed (and besides, in this case the benefit is to the website, and the cost is to the user). </p>

<p>Doing some quick maths I'd estimate that the mining would earn the website owner around 0.12 US cents per 24hrs running, at a cost of around 17 cents to the user in power (assumed 1BTC=$5US, difficulty around 1.8m, power 14c/kWh). </p>

<p>In short, it's desirable to block such functionality from running without the user's consent.</p>

<p>How could such integrated mining be disabled without blanket-disabling javascript on all websites? Bear in mind that even though the miner is visible on 4bitcoins dot com, it doesn't need to be visible to work.</p>

<p>ps: I didn't use standard syntax for the website name, as that will only encourage search engines to send more traffic there!</p>
 659: <p>Using a selective JavaScript blocker is basic good practice from a system security point of view, and will prevent websites from using your CPU to mine for bitcoins.</p>

<ul>
<li><p>The <a href="http://noscript.net/" rel="nofollow">NoScript</a> <a href="http://www.mozilla.com/firefox/" rel="nofollow">Firefox</a> extension allows you to disable JavaScript on a per-site or per-page basis.  I like to set it to default to denying JavaScript on every page, and then add an exception for each page on which I want to allow JavaScript to run.</p></li>
<li><p>If you're using <a href="https://www.google.com/chrome" rel="nofollow">Chromium</a> or <a href="http://www.chromium.org/" rel="nofollow">Chrome</a> then there's a built in Javascript blocker.  Go to the 'wrench' menu, select "Preferences", then "Under the bonnet" (or 'hood' if you speak American?) then click "Content Settings" in the "Privacy" section and select "Do not allow any site to run JavaScript".  Then whenever you're on a site which needs JavaScript to run, you'll see a red X at the right hand end of the address bar which you can click to allow JavaScript on just that site.</p></li>
<li><p>If you're using Internet Explorer you're probably not too concerned about what random strangers run on your computer.  Enjoy.</p></li>
</ul>
 27: <p>It isn't really theft if you're broadcasting your availability to run javascripts. There are blockers that allow you to selectively block javascript files - check your browser's extensions (Chrome and FF both have many options).</p>
 85: <p>You would need some kind of browser plug-in that monitors the CPU consumption of JavaScript and alerts you if you see excessive usage for an extended period of time.</p>
 50: <p>You can use <a href="http://adblockplus.org/en/">Adblock Plus</a> to block the miner script.  In this case it would be:</p>

<pre><code>http://www.bitcoinplus.com/js/miner.js
</code></pre>
