Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions coin.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,12 @@ 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 @@ -196,11 +201,11 @@ var CoinWidgetCom = {

$html = ''
+ '<label>'+$config.lbl_address+'</label>'
+ '<input type="text" readonly '+$sel+' value="'+$config.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="'+CoinWidgetCom.source+'icon_wallet.png" /></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="'+CoinWidgetCom.source+'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="'+CoinWidgetCom.source+'icon_'+$config.currency+'.png" width="16" height="16" title="This is a '+$config.currency+' wallet address." />'
+ '<img class="COINWIDGET_INPUT_ICON" src="'+CoinWidgetCom.source+'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 @@ -209,7 +214,7 @@ var CoinWidgetCom = {
}
if ($config.qrcode) {
$html += '<img class="COINWIDGETCOM_QRCODE" data-coinwidget-instance="'+$instance+'" src="'+CoinWidgetCom.source+'icon_qrcode.png" width="16" height="16" />'
+ '<img class="COINWIDGETCOM_QRCODE_LARGE" src="'+CoinWidgetCom.source+'icon_qrcode.png" width="111" height="111" />'
+ '<img class="COINWIDGETCOM_QRCODE_LARGE" src="'+CoinWidgetCom.source+'icon_qrcode.png" width="111" height="111" alt="'+$config.currency+' address QR code" />'
;
}
var $div = $('<div></div>');
Expand Down Expand Up @@ -297,7 +302,7 @@ var CoinWidgetCom = {
};
x.src = obj.source;
x.id = obj.id;
document.lastChild.firstChild.appendChild(x);
document.getElementsByTagName("head")[0].appendChild(x);
}
}
, stylesheet_loaded: false
Expand Down