Giter VIP home page Giter VIP logo

eth-button's Introduction

code style: prettier

eth-button

A simple way to receive Ether donations. Works with Mist and MetaMask.

Check the github pages for more information.

Usage

Add script tag where you want the UI to appear:

<script
  type="text/javascript"
  src="https://cdn.rawgit.com/eth-button/eth-button/09673e85d517452e18a5248b96115bc552a0ac01/dist/eth-button.js"
  data-address="{YOUR ETHEREUM ADDRESS}"
  data-meta="eth-button">
</script>

You should be able to copy and paste the above, replacing only the YOUR ETHEREUM ADDRESS with your public Ethereum address. Or, you can use the generator on the documentation site.

Details:

  • data-address - This parameter is required. This is the address you would like to receive donations with.
  • data-meta - This parameter is required. Copy and paste it from above.
  • src - The above should always include a direct link to the minified script.
    • You should always link directly to git hashes, for security reasons. Git tags can be changed, but git commit hashes will always point to a specific version of code.

Advanced Usage

If you would like to customize the styles, please take a look at styles.js. These styles will be added to the head of the page, unless a style tag with the id EthButtonStyles already exists. To load custom styles, either add your own style tag with the id EthButtonStyles, or extend the existing styles with your own CSS rules.

If you prefer to not trust minified code (totally fair), you can fork this repository, build your own, and host it yourself.

Building

Install dependencies with npm install. All dependencies are installed locally and should be version locked.

To build the code, run npm run webpack. This will write a new version to dist/eth-button.js.

To test changes locally, try running npm run dev. This will start a webpack-dev-server instance and serve the whole directory on localhost at port 8080. You can then visit http://localhost:8080/examples/demo.html to view changes live. webpack-dev-server will auto-reload the page when you make changes to the source files.

You can also run your own ganache-cli instance with npm run testrpc. This will autogenerate a few addresses that can be accessed via MetaMask. The default address in demo.html is the second of such addresses. The ganache-cli instance is configured with a deterministic seed and automining with a blocktime of 14 seconds.

Bugs

If you find a bug, or would like to see a feature implemented, please open an issue in the github repository. Pull requests are also always welcome!

Documentation

See the github pages.

eth-button's People

Contributors

eth-button avatar june29 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.