Skip to content

Commit

Permalink
Ethplorer widgets.
Browse files Browse the repository at this point in the history
  • Loading branch information
lexa-m committed Feb 23, 2017
1 parent 6d06960 commit 8674c86
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion api/widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,11 @@ ethplorerWidget = {
widgetOptions = $.extend(true, {}, widget.options.widgetOptions || {});

if('undefined' !== typeof(widgetOptions.getCode)) delete widgetOptions.getCode;
var widgetCode = '<div id="' + id + '"></div>' + cr;

var widgetCode = 'Add jQuery in the HEAD section of your page (if not present):' + cr;
widgetCode += '<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"></script>' + cr + cr;
widgetCode += 'Put code displayed below somewhere in BODY section.' + cr + cr;
widgetCode += '<div id="' + id + '"></div>' + cr;
widgetCode += '<script type="text/javascript">' + cr;
widgetCode += 'if(typeof(eWgs) === \'undefined\'){ document.write(\'<scr\' + \'ipt src="/api/widget.js?\' + new Date().getTime().toString().substr(0,7) + \'" async></scr\' + \'ipt>\'); var eWgs = []; }' + cr;
widgetCode += 'eWgs.push(function(){ethplorerWidget.init(\'#' + id + '\', \'' + widget.options.widgetType + '\'';
Expand Down

0 comments on commit 8674c86

Please sign in to comment.