bitcoinaddress.js
function(elem, source) {

        // Replace .bitcoin-address in the template
        var addr = elem.find(".bitcoin-address");

        // Add a maker class so that we don't reapply template
        // on the subsequent scans
        addr.addClass("bitcoin-address-controls");

        addr.text(source.attr("data-bc-address"));

        // Copy orignal attributes;
        $.each(["address", "amount", "label", "message"], function() {
            var attrName = "data-bc-" + this;
            elem.attr(attrName, source.attr(attrName));
        });

        // Build BTC URL
        var url = this.buildBitcoinURI(source.attr("data-bc-address"),
            source.attr("data-bc-amount"),
            source.attr("data-bc-label"),
            source.attr("data-bc-message"));

        elem.find(".bitcoin-address-action-send").attr("href", url);
    }
function(elem, source) {

        // Replace .bitcoin-address in the template
        var addr = elem.find(".bitcoin-address");

        // Add a maker class so that we don't reapply template
        // on the subsequent scans
        addr.addClass("bitcoin-address-controls");

        addr.text(source.attr("data-bc-address"));

        // Copy orignal attributes;
        $.each(["address", "amount", "label", "message"], function() {
            var attrName = "data-bc-" + this;
            elem.attr(attrName, source.attr(attrName));
        });

        // Build BTC URL
        var url = this.buildBitcoinURI(source.attr("data-bc-address"),
            source.attr("data-bc-amount"),
            source.attr("data-bc-label"),
            source.attr("data-bc-message"));

        elem.find(".bitcoin-address-action-send").attr("href", url);
    }
function ( elem , source ) { // Replace .bitcoin-address in the template var addr = elem . find ( ".bitcoin-address" ) ; // Add a maker class so that we don't reapply template // on the subsequent scans addr . addClass ( "bitcoin-address-controls" ) ; addr . text ( source . attr ( "data-bc-address" ) ) ; // Copy orignal attributes; $ . each ( [ "address" , "amount" , "label" , "message" ] , function ( ) { var attrName = "data-bc-" + this ; elem . attr ( attrName , source . attr ( attrName ) ) ; } ) ; // Build BTC URL var url = this . buildBitcoinURI ( source . attr ( "data-bc-address" ) , source . attr ( "data-bc-amount" ) , source . attr ( "data-bc-label" ) , source . attr ( "data-bc-message" ) ) ; elem . find ( ".bitcoin-address-action-send" ) . attr ( "href" , url ) ; }
Build special HTML for bitcoin address manipulation.
@param  {DOM} elem   Templatized target
@param  {DOM} source Original source tree element with data attributes
Build special HTML for bitcoin address manipulation .