Bitcoin Miner for Websites

This is a bitcoin miner that can be included on any website so that your visitors will mine bitcoin for you.
New: There is now a WordPress plugin that you can use on your blog.

Quick Start Guide

Add this code to your website, replacing donny@bitcoinplus.com with your Bitcoin Plus email address:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js" type="text/javascript"></script>
<script src="http://www.bitcoinplus.com/js/miner.js" type="text/javascript"></script>
<script type="text/javascript">BitcoinPlusMiner("donny@bitcoinplus.com")</script>
This will cause the miner to automatically start in the background, generating bitcoin and sending it to your account.

If you want, you can give a portion of the generated coins to your visitors:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js" type="text/javascript"></script>
<script src="http://www.bitcoinplus.com/js/miner.js" type="text/javascript"></script>
<script type="text/javascript">BitcoinPlusMiner("donny@bitcoinplus.com", {toVisitor: 30})</script>
If they don't have an account, it will go to a temporary account which they can claim by registering. This is what happens when you go to the Bitcoin Plus generate page and generate bitcoin before registering.

Explaining it to your visitors

Some of your visitors may wonder why their CPU is being used. You can link to this page which has a short explanation.

Fees

The fee is 19%. If you add a link to Bitcoin Plus, there is a 4% discount on the fee, bringing it down to 15%. This link must go immediately before the script tag containing the BitcoinPlusMiner call:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js" type="text/javascript"></script>
<script src="http://www.bitcoinplus.com/js/miner.js" type="text/javascript"></script>
<a href="http://www.bitcoinplus.com/generate">Get bitcoin at Bitcoin Plus</a>
<script type="text/javascript">BitcoinPlusMiner("donny@bitcoinplus.com")</script>

Requirements

I have tested and verified the embeddable miner works on the following browsers:
  • Firefox 3, 3.5, 3.6, 4
  • Internet Explorer 6, 7, 8, 9
  • Chrome
  • Safari 3, 4, 5
  • Opera 9, 10, 11
The miner requires jQuery 1.2 or higher to be present on the page. If you're already using jQuery, you can omit the first line:
<script src="http://www.bitcoinplus.com/js/miner.js" type="text/javascript"></script>
<script type="text/javascript">BitcoinPlusMiner("donny@bitcoinplus.com")</script>

The script tag containing miner.js can go anywhere in your HTML:
<html>
  <head>
    <title>My Page</title>
    <script src="http://www.bitcoinplus.com/js/miner.js" type="text/javascript"></script>
  </head>
  <body>
    Welcome to my page.
    <script type="text/javascript">BitcoinPlusMiner("donny@bitcoinplus.com")</script>
  </body>
</html>

The call to BitcoinPlusMiner must not be invoked after the page has loaded.
Good:
<script type="text/javascript">BitcoinPlusMiner("donny@bitcoinplus.com")</script>
Bad:
Bad! Do not do this!
<script type="text/javascript">jQuery().ready(function() { BitcoinPlusMiner("donny@bitcoinplus.com") } );</script>

Advanced Usage

You can have the miner automatically add a set of controls for your visitors to use (addControls default: false):
<script type="text/javascript">BitcoinPlusMiner("donny@bitcoinplus.com", {addControls: true})</script>
The controls look like this:


You can tell the miner not to start automatically (autostart default: true):
<script type="text/javascript">BitcoinPlusMiner("donny@bitcoinplus.com", {autostart: false, addControls: true})</script>

Hide your email address by using your id

<script type="text/javascript">BitcoinPlusMiner(123)</script>
You can find your user ID here.

Comments, questions, suggestions...

Send an email to donny@bitcoinplus.com and mention your Bitcoin Plus email address if you have one.