Skip to content

A simple html plugin to allow people to donate the equivalent bitcoin amount of a donation of a chosen fiat currency.

Notifications You must be signed in to change notification settings

nrobinson2000/donate-bitcoin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Slack Status Donate Bitcoin

donate-bitcoin

Copyright (GPL) 2016 Nathan Robinson

A simple html plugin to allow people to donate the equivalent bitcoin amount of a donation of a chosen fiat currency.

Click here for a Demo.

Configuration: (inside of index.js)

var address = "PUT_ADDRESS_HERE"; // The bitcoin address to receive donations. Change to yours
var popup = false; // Set to true if you want a popup to pay bitcoin
var currency_code = "USD"; // Change to your default currency. Choose from https://api.bitcoinaverage.com/ticker/
var qrcode = true; // Set to false to disable qrcode
var link = true; // Set to false to disable generating hyperlink
var organization = "Example"; // Change to your organization name
var mbits = true; // Set to false to display bitcoin traditionally

Use:

  • Link people to your donate-bitcoin page to let them chose how much Bitcoin to donate.
  • Link people to your donate-bitcoin page with a set amount and specific currency for them to donate. This is done by adding something like ?amount=100&currency=USD to your url. (Example) Read more in the Advanced Configuration.

Screenshot:

Create a donation button:

To create a cool button like this, Donate Bitcoin, you can use the shields.io API.

Markdown:

[![Donate Bitcoin](https://img.shields.io/badge/donate-$10-orange.svg)](http://example.com/donate-bitcoin/?amount=10&currency=USD)

HTML:

<a href="http://example.com/donate-bitcoin/?amount=10&currency=USD"><img src="https://img.shields.io/badge/donate-$10-orange.svg"></a>

Embed:

You can use HTML to embed donate-bitcoin into one of your existing pages to add an option for people to donate right on your page.

<iframe style="border:none;" src="donate-bitcoin/index.html" height="600px" width="400px"></iframe>

Or with QR code option disabled:

<iframe style="border:none;" src="donate-bitcoin/index.html" height="200px" width="400px"></iframe>

A demo of donate-bitcoin being embedded can be found on my portfolio. https://nrobinson2000.github.io/about/

Advanced Configuration:

You can override any of the variables for donate-bitcoin by adding the parameters in your URL. Different variables are separated with a &. For example, to donate 10 Pounds Sterling to Satoshi Nakamoto, you would add:

/?amount=10&currency=GBP&name=Satoshi-Nakamoto

to your URL. See this example in action.

Variables that you can set:

  • amount - Set the amount of currency to donate.
  • address - Set a Bitcoin address.
  • popup - Enable / Disable popup. (true or false)
  • currency - Set currency. (Chose from the Bitcoin average API)
  • qrcode - Enable / Disable QR code. (true or false)
  • link - Enable / Disable Hyperlink. (true or false)
  • name - Set your name. ( "Donate Bitcoin to NAME") Separate words with -, use -- for a - !
  • mbits - Display bitcoin donation in mBits. (Milli-Bitcoins) (true or false)

Custom Examples of donate-bitcoin:

I have installed donate-bitcoin on my po-util website, at https://po-util.com/donate

Here is what it looks like on an iPhone 6 Plus:

About

A simple html plugin to allow people to donate the equivalent bitcoin amount of a donation of a chosen fiat currency.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published