Skip to content

Commit

Permalink
Merged pull request #6 on coinwidget.com
Browse files Browse the repository at this point in the history
  • Loading branch information
sebaslogen committed Feb 9, 2014
1 parent 6f6654e commit 5636c81
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions javascripts/coin.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ var CoinWidgetCom = {
config = CoinWidgetCom.validate(config);
CoinWidgetCom.config[CoinWidgetComCounter] = config;
CoinWidgetCom.loader.jquery();
document.write('<span data-coinwidget-instance="'+CoinWidgetComCounter+'" class="COINWIDGETCOM_CONTAINER"></span>');
var $span = document.createElement('span');
$span.setAttribute('data-coinwidget-instance', CoinWidgetComCounter);
$span.setAttribute('class', 'COINWIDGETCOM_CONTAINER');
document.getElementsByTagName('body')[0].appendChild($span);
CoinWidgetComCounter++;
}
, validate: function(config) {
Expand Down Expand Up @@ -202,11 +205,11 @@ var CoinWidgetCom = {

$html = ''
+ '<label>'+$config.lbl_address+'</label>'
+ '<input type="text" readonly '+$sel+' value="'+$config.wallet_address+'" />'
+ '<a class="COINWIDGETCOM_CREDITS" href="http://coinwidget.com/" target="_blank">CoinWidget.com</a>'
+ '<a class="COINWIDGETCOM_WALLETURI" href="'+$config.currency.toLowerCase()+':'+$config.wallet_address+'" target="_blank" title="Click here to send this address to your wallet (if your wallet is not compatible you will get an empty page, close the white screen and copy the address by hand)" ><img src="images/icon_wallet.png" /></a>'
+ '<a class="COINWIDGETCOM_CLOSER" href="javascript:;" onclick="CoinWidgetCom.hide('+$instance+');" title="Close this window">x</a>'
+ '<img class="COINWIDGET_INPUT_ICON" src="images/icon_'+$config.currency+'.png" width="16" height="16" title="This is a '+$config.currency+' wallet address." />'
+ '<input type="text" readonly="readonly" '+$sel+' value="'+$config.wallet_address+'" />'
+ '<a class="COINWIDGETCOM_CREDITS" href="http://coinwidget.com/" target="_blank">CoinWidget.com</a>'
+ '<a class="COINWIDGETCOM_WALLETURI" href="'+$config.currency.toLowerCase()+':'+$config.wallet_address+'" target="_blank" title="Click here to send this address to your wallet (if your wallet is not compatible you will get an empty page, close the white screen and copy the address by hand)" ><img src="images/icon_wallet.png" alt="Send '+$config.currency+' to address" /></a>'
+ '<a class="COINWIDGETCOM_CLOSER" href="javascript:;" onclick="CoinWidgetCom.hide('+$instance+');" title="Close this window">x</a>'
+ '<img class="COINWIDGET_INPUT_ICON" src="images/icon_'+$config.currency+'.png" width="16" height="16" title="This is a '+$config.currency+' wallet address." alt="'+$config.currency+' Logo" />'
;
if ($config.counter != 'hide') {
$html += '<span class="COINWIDGETCOM_COUNT">0<small>'+$config.lbl_count+'</small></span>';
Expand All @@ -216,7 +219,7 @@ var CoinWidgetCom = {
}
if ($config.qrcode) {
$html += '<img class="COINWIDGETCOM_QRCODE" data-coinwidget-instance="'+$instance+'" src="images/icon_qrcode.png" width="16" height="16" />'
+ '<img class="COINWIDGETCOM_QRCODE_LARGE" src="images/icon_qrcode.png" width="111" height="111" />'
+ '<img class="COINWIDGETCOM_QRCODE_LARGE" src="images/icon_qrcode.png" width="111" height="111" alt="'+$config.currency+' address QR code" />'
;
}
var $div = $('<div></div>');
Expand Down

0 comments on commit 5636c81

Please sign in to comment.