`);} if (exchange !==undefined) { $(this).append(``);} $("#buttonSearch").attr('disabled', true);});} function loadInputCoin() { let lastCoinPayload;$('#inputCoin').autoComplete({ minLength: 1, resolver: 'custom', preventEnter: true, noResultsText: searchNoResultsText, events: { search: function(query, callback) { searchLastQuery=query;$.ajax( '/api/coins/search', {data: { 'q': query }} ).done(function(res) { if (searchLastQuery==query) { lastCoinPayload=res.payload;callback(res.payload);} });} }, formatResult: function(item) { let displayName=item.type=="coin" ? `${item.name} (${item.symbol})`: item.name;return { text: item.name, html: [`
${displayName}`] };} });$("#inputCoin").focus(function() { $(this).select();});$('#inputCoin').on('autocomplete.select', function(evt, item) { $(this).attr('slug', item.slug);});$('#inputCoin').on('autocomplete.freevalue', function(evt, item) { if ($(this).val()=='') { $(this).val("All Coins");$(this).removeAttr('slug');} else { if (lastCoinPayload !==undefined && lastCoinPayload.length > 0) { $(this).val(lastCoinPayload[0].name);$(this).attr('slug', lastCoinPayload[0].slug);} else { $(this).val("All Coins");$(this).removeAttr('slug');} } });} function loadInputExchange() { let lastExchangePayload;$('#inputExchange').autoComplete({ minLength: 1, resolver: 'custom', preventEnter: true, noResultsText: searchNoResultsText, events: { search: function(query, callback) { searchLastQuery=query;$.ajax( '/api/exchanges/search', {data: { 'q': query }} ).done(function(res) { if (searchLastQuery==query) { lastExchangePayload=res.payload;callback(res.payload);} });} }, formatResult: function(item) { let displayName=item.type=="coin" ? `${item.name} (${item.symbol})`: item.name;return { text: item.name, html: [`
${displayName}`] };} });$("#inputExchange").focus(function() { $(this).select();});$('#inputExchange').on('autocomplete.select', function(evt, item) { $(this).attr('slug', item.slug);});$('#inputExchange').on('autocomplete.freevalue', function(evt, item) { if ($(this).val()=='') { $(this).val("All Exchanges");$(this).removeAttr('slug');} else { if (lastExchangePayload !==undefined && lastExchangePayload.length > 0) { $(this).val(lastExchangePayload[0].name);$(this).attr('slug', lastExchangePayload[0].slug);} else { $(this).val("All Exchanges");$(this).removeAttr('slug');} } });} } function loadTable() { let myTable;$.ajax({ url: "/static/vendor/DataTables/datatables.min.js", dataType: "script", async: true }).done(function() { myTable=$('#myTable').DataTable({ aaSorting: [], "paging": false, "bInfo": false, "searching": false, "responsive": true, "columnDefs": [ ], "language": { "search": "", "searchPlaceholder": "Bitcoin", "zeroRecords": "No Deals Found", }, "bLengthChange": false, "pageLength": 25 });});} function loadSparklines() { let hasStakes=true;if (hasStakes) { $.ajax({ url: "/static/js/vendor/jquery.sparkline/jquery.sparkline.min.js", dataType: "script", async: true }).done(function() { $.ajax({ url: "https://coinando.com/api/sparklines?coin_ids=1,2,5,6,3,7,9,10,4,19,2846,17,75,19093,153,110,13,8,1504,15,21,25449,28123,23,223,16770,18855,132,21308,206,25076,20,200,20484,25,24352,337,18,18142,101,26193,72,389,24277,14198,67,18087,24,91,13974,31010,29,25221,100,280,19697,346,17661,514,113,109,23866,17389,301,161,454,23904,27874,49,88,22,43,214,150,24623,28717,2882,115,26,33,103,82,551,6078,145,111,466,38,24465,17924,1918,24667,35,76,95,119,501,7902,24093,427,224,25439,221,85,24747,523,387,26221,25403,148,198,167,12457,16262,24331,25261,27,129,374,25700,241,411,27686,429,463,472,26044,29721,359,31,487,152,64,25880,123,108,27537,17920,40,160,31186,27615,27096,171,439,25218,2854,348,503,41,144,46,27894,18119,29650,5911,147,299,414,267,234,126,2852,377,27918,116,107,30158,69,24775,285,151,512,277,37,226,27101,489,17453,31456,270,30801,13706,14958,34,506,19353,137,28181,21792,11154,28122,6256,36,15808,435,217,56,207,169,243,201,12134,14149,14182,398,19200,390,138,469,87,25851,388,18297,289,24195,26014,552,24227,294,6640,369,21719,158,79,238,143,25161,31060,156,27508,494,21402,383,73,496,112,216,25768,431,17158,247,29121,90,255,31423,25157,943,2844,205,29615,127,114,27840,297,300,25074,259,1570,117,453,25818,24334,240,444,78,44,367,517,550,84,140,25420,403,475,157,208,29511,202,218,25191,232,493,29720,19564,2867,28121,83,2820,486,418,251,2108,164,541,94,545,154,27407,351,253,235,245,51,27028,24967,428,249,12,24636,379,18325,11226,1542,526,29734,70,27887,236,28285,28574,89,106,490,26336,1345,166,491,17923,335,1897,537,45,31428,26623,23868,13296,345,292,27600,30723,1707,19104,93,27851,11638,24931,20962,343,165,28026,191,26817,195,24658,31368,539,2784,7653,25428,136,29180,26575,311,28520,26022,12476,219,31473,409,25551,71,2843,481,29022,77,196,74,1482,30290,464,1622,18952,237,507,1565,8660,11164,17033,1299,24720,281,27790,68,323,231,492,26255,213,27684,19732,162,415,27876,488,6820,31331,32,204,25866,290,17626,30474,24846,505,96,17467,31085,29702,19759,2211,15202,163,8365,66,447,28654,2194,25307,19352,465,27842,269,362,26538,29888,322,1467,199,128,28693,13665,17204,470,1414,25124,6714,421,460,99,7781,139,28242,279,25325,425,122,27366,4296,194,262,1728,2893,538,15031,135,1398,948,1574,1397,1563,553,102,65,24402,988,1469,520,528,2185,25732,2878,24332,27415,80,25741,10069,30531,25231,57,27880,315,1461,2161,344,27881,11274,26191,2196,228,258,26408,9647,26933,433,24405,1396,42,25202,26758,1487,1985,30565,27796,9604,52,26983,6759,1401,1812,305,29515,1579,50,146,29102,1399,884,842,1781,59,5595,1300,24387,26023,20577,5984,308,524,24431,25990,17496,1727,27309,13638,15895,15939,28255,30475,26377,31199,21126,28785,1339,17765,26909,18038,30548,417,1545,26256,1633,14310,25480,408,29707,1639,24779,27253,27691,430,27937,28681,27118,1779,29218,7341,836,24109,25738,895,27808,1777,25546,25534,1977,28916,28089,1517,5019,28701,28643,17728,26815,1576,26296,1914,29201,28868,17694,26410,25220,14949,60,25640,24027,25152,31321,4088,26826,24466,24461,28369,30624,26279,13711,27322,29369,26461,26799,26810,16468,27914,26041,25723,25975,29498,29435,11118,13538,30857,25681,28828,26129,24648,26655,27361,19016,3684,6843,39,26716,26679,11208,209,11765,29645,24289,19049,27337,16461,12700,26005,26884,14399,9431,6782,17608,13626,15671,16286,23799,18857,17160,27342,17832,17597,10651,7771,825,18414,1709,27307,18533,30424,2951,3069,877,894,3742,424,5762,6326,7817,9310,11836,12935,18114,21570,21654,23824,25552,25684,25795,27546,28010,29411,11,19063,28719,25030,29614,193,212,19461,14225,211,97", dataType: "json", async: true }) .done(function(data) { $.each(data, function(key, value) { let firstVal=value[0];let lastVal=value[value.length - 1];let balance=lastVal - firstVal;let lineColor;let lineWidth=1;if (balance >=0) { lineColor='#4FC280';} else if (balance < 0) { lineColor='#D6455D';} else { lineColor='#A9A9A9';lineWidth=1;} $("#sparkline_" + key).sparkline(value, { type: 'line', width: '100%', lineWidth: lineWidth, lineColor: lineColor, fillColor: null, spotColor: null, minSpotColor: null, maxSpotColor: null, highlightSpotColor: null, highlightLineColor: null, disableTooltips: true });});});});} }