jan_dembowski

Untitled

Mar 10th, 2018
463
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var dictionary = {};
  2. dictionary.currency = [{
  3.     text: "USD",
  4.     id: "USD"
  5. }, {
  6.     text: "AUD",
  7.     id: "AUD"
  8. }, {
  9.     text: "BRL",
  10.     id: "BRL"
  11. }, {
  12.     text: "CAD",
  13.     id: "CAD"
  14. }, {
  15.     text: "CHF",
  16.     id: "CHF"
  17. }, {
  18.     text: "CLP",
  19.     id: "CLP"
  20. }, {
  21.     text: "CNY",
  22.     id: "CNY"
  23. }, {
  24.     text: "CZK",
  25.     id: "CZK"
  26. }, {
  27.     text: "DKK",
  28.     id: "DKK"
  29. }, {
  30.     text: "EUR",
  31.     id: "EUR"
  32. }, {
  33.     text: "GBP",
  34.     id: "GBP"
  35. }, {
  36.     text: "HKD",
  37.     id: "HKD"
  38. }, {
  39.     text: "HUF",
  40.     id: "HUF"
  41. }, {
  42.     text: "IDR",
  43.     id: "IDR"
  44. }, {
  45.     text: "ILS",
  46.     id: "ILS"
  47. }, {
  48.     text: "INR",
  49.     id: "INR"
  50. }, {
  51.     text: "JPY",
  52.     id: "JPY"
  53. }, {
  54.     text: "KRW",
  55.     id: "KRW"
  56. }, {
  57.     text: "MXN",
  58.     id: "MXN"
  59. }, {
  60.     text: "MYR",
  61.     id: "MYR"
  62. }, {
  63.     text: "NOK",
  64.     id: "NOK"
  65. }, {
  66.     text: "NZD",
  67.     id: "NZD"
  68. }, {
  69.     text: "PHP",
  70.     id: "PHP"
  71. }, {
  72.     text: "PKR",
  73.     id: "PKR"
  74. }, {
  75.     text: "PLN",
  76.     id: "PLN"
  77. }, {
  78.     text: "RUB",
  79.     id: "RUB"
  80. }, {
  81.     text: "SEK",
  82.     id: "SEK"
  83. }, {
  84.     text: "SGD",
  85.     id: "SGD"
  86. }, {
  87.     text: "THB",
  88.     id: "THB"
  89. }, {
  90.     text: "TRY",
  91.     id: "TRY"
  92. }, {
  93.     text: "TWD",
  94.     id: "TWD"
  95. }, {
  96.     text: "ZAR",
  97.     id: "ZAR"
  98. }];
  99. dictionary.coinUrl = "https://min-api.cryptocompare.com/data/";
  100. dictionary.cryptocompareUrl = "https://www.cryptocompare.com";
  101. dictionary.pluginName = "/wp-content/plugins/cryptocurrency-rocket-tools";
  102. String.prototype.replaceAll = function(a, b) {
  103.     var c = this;
  104.     return c.replace(new RegExp(a, "g"), b)
  105. };
  106. isEmpty = function(a) {
  107.     return a == null || a == ""
  108. };
  109. SToA = function(b) {
  110.     if (!b) {
  111.         return null
  112.     }
  113.     var a = b.split(",");
  114.     jQuery.each(a, function(c, d) {
  115.         a[c] = d.replace(" ", "")
  116.     });
  117.     return a
  118. };
  119. renderArray = function(a, c, b) {
  120.     if (!c.html()) {
  121.         if (a.length > 1) {
  122.             jQuery.each(a, function(d, e) {
  123.                 c.append(b.replaceAll("{{name}}", e))
  124.             })
  125.         }
  126.     }
  127. };
  128. waitAjax = function(a) {
  129.     jQuery(document).ajaxStop(function() {
  130.         jQuery("#" + a + "_processing").hide()
  131.     })
  132. };
  133. sortCoins = function(b) {
  134.     var a = [];
  135.     jQuery.each(b, function(c, d) {
  136.         a.push(d)
  137.     });
  138.     a = a.sort(function(d, c) {
  139.         return parseInt(d.SortOrder) - parseInt(c.SortOrder)
  140.     });
  141.     return a
  142. };
  143.  
  144. function priceMultiRequests(b, a, d) {
  145.     var e = [],
  146.         c = "";
  147.     jQuery.each(b ? b : dictionary.coinsList, function(f, g) {
  148.         c += (b ? g : f) + ",";
  149.         if (c.length > 100) {
  150.             c = c.substring(0, c.length - 1);
  151.             e.push(jQuery.get(dictionary.coinUrl + "pricemultifull?fsyms=" + c + "&tsyms=" + a, function(h) {
  152.                 d.DISPLAY = jQuery.extend(true, d.DISPLAY, h.DISPLAY);
  153.                 d.RAW = jQuery.extend(true, d.RAW, h.RAW)
  154.             }));
  155.             c = ""
  156.         }
  157.     });
  158.     if (c !== "") {
  159.         e.push(jQuery.get(dictionary.coinUrl + "pricemultifull?fsyms=" + c + "&tsyms=" + a, function(f) {
  160.             d.DISPLAY = jQuery.extend(true, d.DISPLAY, f.DISPLAY);
  161.             d.RAW = jQuery.extend(true, d.RAW, f.RAW)
  162.         }))
  163.     }
  164.     return e
  165. }
  166. var crtools = crtools || {};
  167. var types = ["from", "to", "other"];
  168. crtools.converter = {
  169.     addSelect: function(d, a, b, e) {
  170.         var h = jQuery('<select class="input-group-addon-ct"></select>'),
  171.             g = jQuery('<div><label></label><div class="input-group-ct ' + (e == "other" ? "cr-other to" : "") + '" ><input type="number" class="form-control-ct"></div></div>');
  172.         g.find("input").on({
  173.             keyup: function(f) {
  174.                 crtools.converter.initData(f)
  175.             },
  176.             change: function(f) {
  177.                 crtools.converter.initData(f)
  178.             }
  179.         });
  180.         g.find("label").text(d[a + "Name"]);
  181.         h.on("change", function(l) {
  182.             var f = jQuery(l.currentTarget);
  183.             crtools.converter.initData({
  184.                 currentTarget: f.closest(".calc").find(".from input")
  185.             })
  186.         });
  187.         h.addClass(a);
  188.         g.find("div.input-group-ct").addClass(a);
  189.         b.append(g);
  190.         if (d[a] && d[a] !== "") {
  191.             var k = d[a].split(",");
  192.             if (k.length > 0) {
  193.                 if (k.length === 1) {
  194.                     var c = b.find("div." + a);
  195.                     if (!e) {
  196.                         var i = jQuery('<span class="input-group-addon-ct">' + k[0].replaceAll(" ", "") + " </span>");
  197.                         i.addClass(a);
  198.                         c.append(i)
  199.                     }
  200.                 } else {
  201.                     crtools.converter.addOptions(h, k);
  202.                     b.find("div." + a).append(h)
  203.                 }
  204.             } else {
  205.                 crtools.converter.addOptions(h, dictionary.currency);
  206.                 b.find("div." + a).append(h)
  207.             }
  208.         } else {
  209.             var j = null;
  210.             if (e == "other") {
  211.                 j = jQuery.map(dictionary.currency, function(m, f) {
  212.                     var l = {
  213.                         text: m.text,
  214.                         id: m.id
  215.                     };
  216.                     if (m.text == a) {
  217.                         l.selected = true
  218.                     }
  219.                     return l
  220.                 })
  221.             }
  222.             crtools.converter.addOptions(h, j == null ? dictionary.currency : j);
  223.             b.find("div." + a).append(h)
  224.         }
  225.     },
  226.     init: function(a) {
  227.         var d = this;
  228.         var c = {
  229.             from: crtoolsVars.converter_from,
  230.             to: crtoolsVars.converter_to
  231.         };
  232.         a.toolID = a.toolID.indexOf("#") == 0 ? a.toolID : "#" + a.toolID;
  233.         var b = jQuery('<div class="calc"></div>');
  234.         jQuery.each(types, function(e, f) {
  235.             if (!a.fromName) {
  236.                 a.fromName = c.from
  237.             }
  238.             if (!a.toName) {
  239.                 a.toName = c.to
  240.             }
  241.             if (f == "other") {
  242.                 if (a[f]) {
  243.                     var g = a[f].split(",");
  244.                     a[f] = "";
  245.                     jQuery.each(g, function(h, i) {
  246.                         d.addSelect(a, i, b, "other")
  247.                     })
  248.                 }
  249.             } else {
  250.                 d.addSelect(a, f, b)
  251.             }
  252.         });
  253.         if (jQuery(a.toolID + " .calc").length == 0) {
  254.             jQuery(a.toolID).html(b)
  255.         }
  256.     },
  257.     render: function() {},
  258.     addOptions: function(b, a) {
  259.         b.html("");
  260.         jQuery.each(a, function(c, d) {
  261.             var f = d.id ? d.id : d.replace(" ", "");
  262.             var e = d.text ? d.text : d.replace(" ", "");
  263.             b.append("<option value='" + f + "' " + (d.selected ? "selected='true'" : "") + "'>" + e + "</option>")
  264.         })
  265.     },
  266.     calculate: function(b, d, a, c) {
  267.         if (!c.hasClass("current")) {
  268.             jQuery.get(dictionary.coinUrl + "price?fsym=" + b + "&tsyms=" + d, function(f) {
  269.                 var e;
  270.                 if (c.closest("div").hasClass("to")) {
  271.                     e = (f[d] * parseFloat(a)).toFixed(2)
  272.                 } else {
  273.                     e = (parseFloat(a) / f[d]).toFixed(10)
  274.                 }
  275.                 c.val(e);
  276.                 if (c.closest(".input-group-ct").hasClass("from")) {
  277.                     c.trigger("keyup", {
  278.                         currentTarget: c
  279.                     })
  280.                 }
  281.             })
  282.         }
  283.     },
  284.     initData: function(d) {
  285.         var c = jQuery(d.currentTarget);
  286.         var i = this;
  287.         var h = "current";
  288.         if (c.closest(".input-group-ct").hasClass("to")) {
  289.             c.closest(".calc").find("." + h).removeClass(h);
  290.             c.addClass(h);
  291.             var b = {
  292.                 from: c.closest(".calc").find(".from"),
  293.                 to: c.closest(".input-group-ct")
  294.             };
  295.             this.initFrom(b)
  296.         } else {
  297.             var a = {
  298.                 from: c.closest(".calc").find(".from span"),
  299.                 to: c.closest(".calc").find(".to span")
  300.             };
  301.             var f = c.val(),
  302.                 g = a.from.length != 0 ? a.from.html().replaceAll(" ", "") : c.closest(".calc").find(".from select").val();
  303.             if (f && f != "") {
  304.                 c.closest(".calc").find(".to").each(function(e, j) {
  305.                     var l = i.getCurrency(jQuery(j)),
  306.                         k = jQuery(j).find("input");
  307.                     crtools.converter.calculate(g, l, f, k)
  308.                 })
  309.             }
  310.             c.closest(".calc").find("." + h).removeClass(h)
  311.         }
  312.     },
  313.     initFrom: function(a) {
  314.         var c = {
  315.                 value: a.from.find("input").val(),
  316.                 curruncy: this.getCurrency(a.from)
  317.             },
  318.             b = {
  319.                 value: a.to.find("input").val(),
  320.                 curruncy: this.getCurrency(a.to)
  321.             };
  322.         crtools.converter.calculate(c.curruncy, b.curruncy, b.value, a.from.find("input"))
  323.     },
  324.     getCurrency: function(b) {
  325.         var a = b.find("span, select");
  326.         if (a.prop("tagName") == "SELECT") {
  327.             return a.val().trim()
  328.         } else {
  329.             if (a.prop("tagName") == "SPAN") {
  330.                 return a.text().trim()
  331.             }
  332.         }
  333.         return ""
  334.     },
  335.     removeCurrentClass: function() {}
  336. };
  337. var crtools = crtools || {};
  338. var currencyIcons = {
  339.     USD: {
  340.         Name: "US Dollar",
  341.         ISOSymbol: "$"
  342.     },
  343.     EUR: {
  344.         Name: "Euro",
  345.         ISOSymbol: "€"
  346.     },
  347.     GBP: {
  348.         Name: "British Pound",
  349.         ISOSymbol: "£"
  350.     },
  351.     BTC: {
  352.         Name: "Bitcoin",
  353.         ISOSymbol: "Ƀ"
  354.     },
  355.     ETH: {
  356.         Name: "Ether",
  357.         ISOSymbol: "Ξ"
  358.     },
  359.     GOLD: {
  360.         Name: "Gold",
  361.         ISOSymbol: "Gold g"
  362.     },
  363.     AUD: {
  364.         Name: "Australian Dollar",
  365.         ISOSymbol: "AUD"
  366.     },
  367.     BRL: {
  368.         Name: "Brazilian Real",
  369.         ISOSymbol: " R$"
  370.     },
  371.     CAD: {
  372.         Name: "Canadian Dollar",
  373.         ISOSymbol: "CAD"
  374.     },
  375.     CHF: {
  376.         Name: "Swiss Franc",
  377.         ISOSymbol: "CHF"
  378.     },
  379.     CNY: {
  380.         Name: "Chinese Yuan",
  381.         ISOSymbol: "¥"
  382.     },
  383.     HKD: {
  384.         Name: "Hong Kong Dollar",
  385.         ISOSymbol: "HKD"
  386.     },
  387.     HUF: {
  388.         Name: "Hungarian Forint ",
  389.         ISOSymbol: "HUF"
  390.     },
  391.     INR: {
  392.         Name: "Indian Rupee",
  393.         ISOSymbol: "₹"
  394.     },
  395.     JPY: {
  396.         Name: "Japanese Yen",
  397.         ISOSymbol: "¥"
  398.     },
  399.     KRW: {
  400.         Name: "South Korean Won",
  401.         ISOSymbol: "₩"
  402.     },
  403.     MXN: {
  404.         Name: "Mexican Peso",
  405.         ISOSymbol: "MXN"
  406.     },
  407.     NZD: {
  408.         Name: "New Zealand Dollar",
  409.         ISOSymbol: "NZD"
  410.     },
  411.     PHP: {
  412.         Name: "Philippines Peso",
  413.         ISOSymbol: "₱"
  414.     },
  415.     PLN: {
  416.         Name: "Polish Zloty",
  417.         ISOSymbol: "zł"
  418.     },
  419.     RON: {
  420.         Name: "Romanian New Leu",
  421.         ISOSymbol: "lei"
  422.     },
  423.     RUB: {
  424.         Name: "Russian Ruble",
  425.         ISOSymbol: "₽"
  426.     },
  427.     SGD: {
  428.         Name: "Singapore Dollar",
  429.         ISOSymbol: "SGD"
  430.     },
  431.     VEF: {
  432.         Name: "Venezuelan Bolivar",
  433.         ISOSymbol: "Bs"
  434.     }
  435. };
  436. var localArgs = {};
  437. crtools.graph = {
  438.     init: function(a) {
  439.         this.initLocale();
  440.         var c = this;
  441.         a.toolID = a.toolID.indexOf("#") == 0 ? a.toolID : "#" + a.toolID;
  442.         localArgs[a.toolID] = a;
  443.         var b = jQuery('<div class="single-chart-block"><div class="sg-fiats"></div><div class="sg-buttons"></div><div class="chart-div" style="width   : 100%; height  : 500px;"></div></div>');
  444.         b.find(".chart-div").attr("id", a.toolID + "-chart-div");
  445.         if (jQuery(a.toolID + " .single-chart-block").length == 0) {
  446.             jQuery(a.toolID).html(b)
  447.         }
  448.         this.render(a);
  449.         jQuery(".period-button").on("click", function(g) {
  450.             var d = jQuery(g.currentTarget);
  451.             jQuery(a.toolID + " .period-button").removeClass("active");
  452.             d.addClass("active");
  453.             var f = d.closest(".single-chart-block").find(".chart-div").attr("id").replace("-chart-div", "");
  454.             localArgs[f].currentPeriod = d.text();
  455.             c.render(a)
  456.         });
  457.         jQuery(".fiat-button").on("click", function(g) {
  458.             var d = jQuery(g.currentTarget);
  459.             jQuery(a.toolID + " .fiat-button").removeClass("active");
  460.             d.addClass("active");
  461.             var f = d.closest(".single-chart-block").find(".chart-div").attr("id").replace("-chart-div", "");
  462.             localArgs[f].currentFiat = d.text();
  463.             c.render(a)
  464.         })
  465.     },
  466.     initLocale: function() {
  467.         AmCharts.dayNames = crtoolsVars.graph_dayNames;
  468.         AmCharts.shortDayNames = crtoolsVars.graph_shortDayNames;
  469.         AmCharts.monthNames = crtoolsVars.graph_monthNames;
  470.         AmCharts.shortMonthNames = crtoolsVars.graph_shortMonthNames
  471.     },
  472.     renderGraph: function(e, h, a, d, f, b) {
  473.         var g = this;
  474.         var c = AmCharts.makeChart(h, {
  475.             type: "stock",
  476.             theme: "light",
  477.             categoryAxesSettings: {
  478.                 minPeriod: d,
  479.                 groupToPeriods: [d]
  480.             },
  481.             dataSets: [{
  482.                 fieldMappings: [{
  483.                     fromField: "value",
  484.                     toField: "value"
  485.                 }, {
  486.                     fromField: "volume",
  487.                     toField: "volume"
  488.                 }],
  489.                 dataProvider: e,
  490.                 title: "",
  491.                 categoryField: "date"
  492.             }],
  493.             panels: [{
  494.                 title: crtoolsVars.graph_valuesName + " " + f,
  495.                 percentHeight: 70,
  496.                 stockGraphs: [{
  497.                     type: "line",
  498.                     id: "g1",
  499.                     valueField: "value",
  500.                     lineThickness: 2,
  501.                     fillAlphas: 0.3,
  502.                     useDataSetColors: false,
  503.                     balloonText: a + " [[value]]",
  504.                     title: "",
  505.                     lineColor: b.line
  506.                 }],
  507.                 chartCursor: {
  508.                     valueBalloonsEnabled: true,
  509.                     valueLineEnabled: true,
  510.                     valueLineBalloonEnabled: true,
  511.                     cursorColor: b.cursor,
  512.                     fullWidth: true,
  513.                     cursorAlpha: 0.1
  514.                 },
  515.                 stockLegend: {
  516.                     valueTextRegular: a + " [[value]]",
  517.                     valueText: a + " [[value]]"
  518.                 }
  519.             }, {
  520.                 title: crtoolsVars.graph_valuesName + " " + f,
  521.                 percentHeight: 30,
  522.                 columnWidth: 0.8,
  523.                 stockGraphs: [{
  524.                     type: "column",
  525.                     id: "g2",
  526.                     valueField: "volume",
  527.                     fillAlphas: 0.8,
  528.                     useDataSetColors: false,
  529.                     balloonText: a + " [[volume]]",
  530.                     title: "",
  531.                     lineColor: b.line
  532.                 }],
  533.                 chartCursor: {
  534.                     valueBalloonsEnabled: true,
  535.                     valueLineEnabled: true,
  536.                     valueLineBalloonEnabled: true,
  537.                     cursorColor: b.cursor,
  538.                     fullWidth: true,
  539.                     cursorAlpha: 0.1
  540.                 },
  541.                 stockLegend: {
  542.                     valueTextRegular: a + " [[value]]",
  543.                     valueText: " [[value]]"
  544.                 }
  545.             }],
  546.             chartScrollbarSettings: {
  547.                 graph: "g1",
  548.                 backgroundAlpha: 0.25,
  549.                 backgroundColor: "#b0b0b0",
  550.                 selectedBackgroundAlpha: 0.8,
  551.                 selectedBackgroundColor: "#b0b0b0"
  552.             },
  553.             responsive: {
  554.                 enabled: true
  555.             }
  556.         });
  557.         c.addListener("dataUpdated", function() {
  558.             g.zoomChart(c, e)
  559.         })
  560.     },
  561.     zoomChart: function(a, b) {
  562.         if (a.zoomToIndexes) {
  563.             a.zoomToIndexes(0, b.length)
  564.         }
  565.     },
  566.     render: function(h) {
  567.         var k = h.coin,
  568.             f = h.fiat,
  569.             i = h.period,
  570.             b = h.toolID,
  571.             a = {
  572.                 line: h.graphColor ? h.graphColor : "#5db75c",
  573.                 cursor: h.cursorColor ? h.cursorColor : "#c90000"
  574.             };
  575.         var g = this;
  576.         if (isEmpty(f)) {
  577.             f = ["USD", "EUR"]
  578.         } else {
  579.             f = SToA(f)
  580.         }
  581.         if (isEmpty(k)) {
  582.             k = "BTC"
  583.         }
  584.         if (isEmpty(i)) {
  585.             i = ["12H", "1D", "1W", "1M", "6M", "1Y", "ALL"]
  586.         } else {
  587.             i = SToA(i)
  588.         }
  589.         if (!h.currentPeriod) {
  590.             h.currentPeriod = jQuery.inArray("1D", i) != -1 ? "1D" : i[0]
  591.         }
  592.         if (!h.currentFiat) {
  593.             h.currentFiat = f[0]
  594.         }
  595.         renderArray(i, jQuery(h.toolID).find(".sg-buttons"), '<button type="button" class="period-button" value={{name}}>{{name}}</button>');
  596.         renderArray(f, jQuery(h.toolID).find(".sg-fiats"), '<button type="button" class="fiat-button" value={{name}}>{{name}}</button>');
  597.         jQuery(h.toolID).find(".sg-buttons [type=button][value=" + h.currentPeriod + "]").addClass("active");
  598.         jQuery(h.toolID).find(".sg-fiats [type=button][value=" + h.currentFiat + "]").addClass("active");
  599.         var c, e, d, j;
  600.         switch (h.currentPeriod) {
  601.             case "12H":
  602.                 c = "1";
  603.                 e = "720";
  604.                 d = "histominute";
  605.                 j = c + "mm";
  606.                 break;
  607.             case "1D":
  608.                 c = "5";
  609.                 e = "288";
  610.                 d = "histominute";
  611.                 j = c + "mm";
  612.                 break;
  613.             case "1W":
  614.                 c = "1";
  615.                 e = "168";
  616.                 d = "histohour";
  617.                 j = c + "hh";
  618.                 break;
  619.             case "1M":
  620.                 c = "1";
  621.                 e = "720";
  622.                 d = "histohour";
  623.                 j = c + "hh";
  624.                 break;
  625.             case "6M":
  626.                 c = "1";
  627.                 e = "182";
  628.                 d = "histoday";
  629.                 j = c + "DD";
  630.                 break;
  631.             case "1Y":
  632.                 c = "1";
  633.                 e = "364";
  634.                 d = "histoday";
  635.                 j = c + "DD";
  636.                 break;
  637.             case "ALL":
  638.                 jQuery.get(ajaxurl + "?action=get_start_date&coin=" + k, function(l) {
  639.                     l = JSON.parse(l);
  640.                     if (l.Response == "Success") {
  641.                         var o = new Date(l.Date);
  642.                         var n = new Date();
  643.                         var p = Math.abs(n.getTime() - o.getTime());
  644.                         var m = Math.ceil(p / (1000 * 3600 * 24));
  645.                         console.log(Math.ceil(m / 1000));
  646.                         c = Math.ceil(m / 1000).toString();
  647.                         e = "1000";
  648.                         d = "histoday";
  649.                         j = c + "DD";
  650.                         g.getDataFromService(b, k, h.currentFiat, c, e, d, j, a)
  651.                     } else {
  652.                         alert(l.Message)
  653.                     }
  654.                 });
  655.                 return
  656.         }
  657.         this.getDataFromService(b, k, h.currentFiat, c, e, d, j, a)
  658.     },
  659.     getDataFromService: function(b, j, g, c, e, d, i, a) {
  660.         var f = [];
  661.         var h = this;
  662.         jQuery.get(dictionary.coinUrl + d + "?fsym=" + j + "&tsym=" + g + "&aggregate=" + c + "&limit=" + e, function(l) {
  663.             if (l.Data != null && l.Data.length > 0) {
  664.                 jQuery.each(l.Data, function(o, p) {
  665.                     f.push({
  666.                         date: new Date(p.time * 1000),
  667.                         value: p.close,
  668.                         volume: p.volumeto
  669.                     })
  670.                 })
  671.             }
  672.             var m = jQuery(b).find(".chart-div");
  673.             var k = currencyIcons[g] == null ? g : currencyIcons[g].ISOSymbol;
  674.             var n = currencyIcons[g] == null ? g : currencyIcons[g].Name;
  675.             h.renderGraph(f, m.attr("id"), k, i, n, a)
  676.         })
  677.     }
  678. };
  679. var crtools = crtools || {};
  680. crtools.pricelist = {
  681.     templates: {
  682.         tabs: '<div class="crtools-pricelist"><div class="tab-div"></div></div>',
  683.         tab: '<a class="tab">{{name}}</a>',
  684.         row: '<div class="crtools-row">\n<div class="row-left"><img class="crtools-logo" src="{{logo}}"><span class="crtools-symbol">{{symbol}}</span></div>\n<div class="row-right"><div class="{{color}}" style="{{styleColor}}"><span class="crtools-price">{{price}}</span> <span class="crtools-change">({{change}}) <img src="{{arrow}}"></span></div></div>\n</div>'
  685.     },
  686.     init: function(b) {
  687.         var a = this.getFiats(b.fiat),
  688.             c = this.getCols(b.cols);
  689.         this.initCoins(b.coin, b.limit, a, c, b.toolID, b.redColor, b.greenColor)
  690.     },
  691.     initCoins: function(d, b, a, e, c, f, h) {
  692.         var g = this;
  693.         jQuery.get(dictionary.coinUrl + "all/coinlist", function(j) {
  694.             crtools.pricelist.sortedCoins = sortCoins(j.Data);
  695.             crtools.pricelist.notSortedCoins = j.Data;
  696.             var i = g.getCoinsList(d, b);
  697.             g.getPrices(i, a, e, c, f, h)
  698.         })
  699.     },
  700.     getCoinsList: function(b, a) {
  701.         if (a && a !== "" && a !== "0") {
  702.             return this.getTopCoins(a)
  703.         } else {
  704.             if (a === "0") {
  705.                 return this.getTopCoins(0)
  706.             } else {
  707.                 if (b && b !== "") {
  708.                     return SToA(b)
  709.                 } else {
  710.                     return this.getTopCoins(10)
  711.                 }
  712.             }
  713.         }
  714.     },
  715.     getTopCoins: function(b) {
  716.         var a = [];
  717.         jQuery.each(crtools.pricelist.sortedCoins, function(c, d) {
  718.             if (b === 0 || c < b) {
  719.                 a.push(d.Symbol)
  720.             } else {
  721.                 return false
  722.             }
  723.         });
  724.         return a
  725.     },
  726.     getPrices: function(e, g, h, d, c, b) {
  727.         var f = this;
  728.         var i = {
  729.             DISPLAY: {},
  730.             RAW: {}
  731.         };
  732.         var a = priceMultiRequests(e, g.join(","), i);
  733.         jQuery.when.apply(jQuery, a).done(function() {
  734.             crtools.pricelist[d] = {
  735.                 coins: i,
  736.                 fiats: g,
  737.                 cols: h,
  738.                 redColor: c,
  739.                 greenColor: b
  740.             };
  741.             jQuery("#" + d).html(f.getHtml(d))
  742.         })
  743.     },
  744.     getFiats: function(a) {
  745.         return a && a !== "" ? SToA(a) : ["USD"]
  746.     },
  747.     getCols: function(a) {
  748.         return a && a !== "" ? SToA(a) : null
  749.     },
  750.     getHtml: function(c) {
  751.         var e = this;
  752.         var b = jQuery(crtools.pricelist.templates.tabs);
  753.         var d = crtools.pricelist[c].fiats[0];
  754.         var a = jQuery(this.getTabsHtml(crtools.pricelist[c].fiats));
  755.         b.find(".tab-div").append(a);
  756.         a.on("click", function(j) {
  757.             var g = jQuery(j.currentTarget);
  758.             var h = g.closest(".crtools-pricelist"),
  759.                 f = g.text();
  760.             var i = h.parent().attr("id");
  761.             e.renderTab(i, f, h)
  762.         });
  763.         this.renderTab(c, d, b);
  764.         return b
  765.     },
  766.     renderTab: function(c, a, b) {
  767.         b.find(".crtools-row").remove();
  768.         this.activateTab(a, b);
  769.         b.append(this.getRowsHtml(crtools.pricelist[c].coins, a, crtools.pricelist[c].cols, crtools.pricelist[c].redColor, crtools.pricelist[c].greenColor))
  770.     },
  771.     activateTab: function(a, c) {
  772.         var b = c.find(".tab");
  773.         b.removeClass("active");
  774.         b.each(function(d, f) {
  775.             var e = jQuery(f);
  776.             if (e.text() === a) {
  777.                 e.addClass("active")
  778.             }
  779.         })
  780.     },
  781.     getTabsHtml: function(a) {
  782.         var c = this;
  783.         var b = "";
  784.         jQuery.each(a, function(d, e) {
  785.             b += c.getTabHtml(e)
  786.         });
  787.         return b
  788.     },
  789.     getTabHtml: function(a) {
  790.         return crtools.pricelist.templates.tab.replace("{{name}}", a)
  791.     },
  792.     getRowsHtml: function(b, a, d, e, g) {
  793.         var f = this;
  794.         var c = "";
  795.         jQuery.each(b.DISPLAY, function(h, i) {
  796.             c += f.getRowHtml(h, i[a], d, e, g)
  797.         });
  798.         return c
  799.     },
  800.     getRowHtml: function(c, e, h, b, a) {
  801.         var d, i, g = "";
  802.         var j = dictionary.cryptocompareUrl + crtools.pricelist.notSortedCoins[c].ImageUrl;
  803.         if (e.CHANGEPCT24HOUR && e.CHANGEPCT24HOUR.substr(0, 1) === "-") {
  804.             i = dictionary.pluginName + "/assets/images/crtools_down.svg";
  805.             if (b && b !== "") {
  806.                 g = "color:" + b;
  807.                 d = ""
  808.             } else {
  809.                 d = "red"
  810.             }
  811.         } else {
  812.             i = dictionary.pluginName + "/assets/images/crtools_up.svg";
  813.             if (a && a !== "") {
  814.                 g = "color:" + a;
  815.                 d = ""
  816.             } else {
  817.                 d = "green"
  818.             }
  819.         }
  820.         var f = crtools.pricelist.templates.row;
  821.         f = f.replace("{{logo}}", j);
  822.         f = f.replace("{{symbol}}", c);
  823.         f = f.replace("{{price}}", e.PRICE.split(" ")[1]);
  824.         f = f.replace("{{change}}", e.CHANGEPCT24HOUR + "%");
  825.         f = f.replace("{{arrow}}", i);
  826.         f = f.replace("{{color}}", d);
  827.         f = f.replace("{{styleColor}}", g);
  828.         var k = jQuery(f);
  829.         if (h) {
  830.             if (h.indexOf("logo") === -1) {
  831.                 k.find(".crtools-logo").remove()
  832.             }
  833.             if (h.indexOf("symbol") === -1) {
  834.                 k.find(".crtools-symbol").remove()
  835.             }
  836.             if (h.indexOf("price") === -1) {
  837.                 k.find(".crtools-price").remove()
  838.             }
  839.             if (h.indexOf("change") === -1) {
  840.                 k.find(".crtools-change").remove()
  841.             }
  842.         }
  843.         return k[0].outerHTML
  844.     }
  845. };
  846. var crtools = crtools || {};
  847. var dt = {},
  848.     dataSet = {};
  849. crtools.table = {
  850.     init: function(a) {
  851.         jQuery.get(dictionary.coinUrl + "all/coinlist", function(b) {
  852.             dictionary.coinsList = b.Data;
  853.             crtools.table.initData(a)
  854.         })
  855.     },
  856.     initData: function(j) {
  857.         var g = ["USD", "EUR"];
  858.         if (j.fiat != null) {
  859.             g = j.fiat.split(",")
  860.         }
  861.         var h = this;
  862.         var b = j.coin,
  863.             f = g,
  864.             e = j.cols,
  865.             o = j.search,
  866.             d = j.pagination;
  867.         var n = {
  868.             base: j.baseLink && j.baseLink !== "" ? j.baseLink : null,
  869.             coins: j.pageLinks && j.pageLinks.length !== 0 ? j.pageLinks : null,
  870.             isGraph: j.graphLink
  871.         };
  872.         if (!e || e == "") {
  873.             e = ["price", "cap", "supply", "volume", "change", "graph"]
  874.         } else {
  875.             e = e.split(",")
  876.         }
  877.         j.toolID = (j.toolID.indexOf("#") == 0 ? "" : "#") + j.toolID;
  878.         if (b && b != "") {
  879.             b = b.split(",");
  880.             jQuery.each(b, function(p, q) {
  881.                 q = q.replaceAll(" ", "").toUpperCase()
  882.             })
  883.         }
  884.         if (d && d != "") {
  885.             d = jQuery.map(d.split(","), function(p) {
  886.                 return parseInt(p)
  887.             })
  888.         } else {
  889.             d = [10, 25]
  890.         }
  891.         var c = {
  892.             fiat: g.length == 1,
  893.             search: o == "no" || o === false,
  894.             length: d.length == 1
  895.         };
  896.         var l = jQuery(".currency select").val();
  897.         if (!l) {
  898.             l = f && f[0] ? f[0] : "USD"
  899.         }
  900.         if (f) {
  901.             dictionary.currency = [];
  902.             jQuery.each(f, function(p, q) {
  903.                 dictionary.currency.push({
  904.                     id: q,
  905.                     text: q
  906.                 })
  907.             })
  908.         }
  909.         dataSet[j.toolID] = [];
  910.         pricemulti = {
  911.             DISPLAY: {},
  912.             RAW: {}
  913.         };
  914.         var a = priceMultiRequests(b, l, pricemulti);
  915.         jQuery.when.apply(jQuery, a).done(function() {
  916.             jQuery.each(b ? b : dictionary.coinsList, function(s, t) {
  917.                 if (b) {
  918.                     s = t;
  919.                     t = dictionary.coinsList[t]
  920.                 }
  921.                 if (pricemulti.DISPLAY[s]) {
  922.                     dataSet[j.toolID].push(m(e, pricemulti, s, l, t))
  923.                 }
  924.             });
  925.             if (dt[j.toolID] == null) {
  926.                 columnsDT = i(e, n);
  927.                 var q = {
  928.                     lengthMenu: d,
  929.                     processing: true,
  930.                     serverSide: true,
  931.                     responsive: true,
  932.                     aoColumns: columnsDT.aoColumns,
  933.                     dom: (c.fiat ? "" : '<"currency">') + (c.search ? "" : "f") + "rtp" + (c.length ? "" : "l"),
  934.                     columns: columnsDT.names,
  935.                     order: [
  936.                         [0, "asc"]
  937.                     ],
  938.                     columnDefs: columnsDT.columnDefs,
  939.                     language: {
  940.                         lengthMenu: crtoolsVars.table_lengthName,
  941.                         search: crtoolsVars.table_search,
  942.                         processing: crtoolsVars.table_processing,
  943.                         paginate: {
  944.                             first: crtoolsVars.table_paginate_first,
  945.                             last: crtoolsVars.table_paginate_last,
  946.                             next: crtoolsVars.table_paginate_next,
  947.                             previous: crtoolsVars.table_paginate_previous
  948.                         }
  949.                     },
  950.                     drawCallback: function(t) {
  951.                         var s = jQuery(this).closest(".dataTables_wrapper").find(".dataTables_paginate");
  952.                         s.toggle(this.api().page.info().pages > 1)
  953.                     },
  954.                     ajax: function(x, E) {
  955.                         var s = this.dataTable().api().settings()[0].sTableId;
  956.                         jQuery("#" + s + "_processing").show();
  957.                         x.start = parseInt(x.start);
  958.                         x.length = parseInt(x.length);
  959.                         var F = x.search.value;
  960.                         var u = 0;
  961.                         var C = x.order[0].column;
  962.                         var y = dataSet[j.toolID][0][C];
  963.                         if (y.fullName) {
  964.                             y = y.fullName
  965.                         }
  966.                         var z, B, t = x.order[0].dir;
  967.                         if (y.indexOf(" ") >= 0) {
  968.                             var w = y.indexOf("%") != -1 ? 0 : 1;
  969.                             var A = y.split(" ")[w];
  970.                             if (isNaN(parseFloat(A))) {
  971.                                 z = "string"
  972.                             } else {
  973.                                 z = "float";
  974.                                 B = w
  975.                             }
  976.                         } else {
  977.                             if (isNaN(y)) {
  978.                                 z = "string"
  979.                             } else {
  980.                                 B = 0;
  981.                                 z = "float"
  982.                             }
  983.                         }
  984.                         dataSet[j.toolID].sort(function(H, G) {
  985.                             var I;
  986.                             if (H.fullName) {
  987.                                 I = true
  988.                             }
  989.                             if (z == "float") {
  990.                                 if (t == "asc") {
  991.                                     return parseFloat(H[C].split(" ")[B].replaceAll(",", "")) - parseFloat(G[C].split(" ")[B].replaceAll(",", ""))
  992.                                 } else {
  993.                                     return parseFloat(G[C].split(" ")[B].replaceAll(",", "")) - parseFloat(H[C].split(" ")[B].replaceAll(",", ""))
  994.                                 }
  995.                             } else {
  996.                                 if (t == "asc") {
  997.                                     return (G[C].fullName ? G[C].fullName : G[C]) < (H[C].fullName ? H[C].fullName : H[C]) ? 1 : -1
  998.                                 } else {
  999.                                     return (G[C].fullName ? G[C].fullName : G[C]) > (H[C].fullName ? H[C].fullName : H[C]) ? 1 : -1
  1000.                                 }
  1001.                             }
  1002.                         });
  1003.                         var v = {
  1004.                             aaData: []
  1005.                         };
  1006.                         var D = 0;
  1007.                         jQuery.each(dataSet[j.toolID], function(G, H) {
  1008.                             if (F !== "") {
  1009.                                 if (H[1].fullName.toLowerCase().indexOf(F.toLowerCase()) >= 0) {
  1010.                                     if (G - u >= parseInt(x.start) && G - u < parseInt(x.start) + parseInt(x.length)) {
  1011.                                         v.aaData.push(H)
  1012.                                     }
  1013.                                     D++
  1014.                                 } else {
  1015.                                     u++
  1016.                                 }
  1017.                             } else {
  1018.                                 if (G >= parseInt(x.start) && G < parseInt(x.start) + parseInt(x.length)) {
  1019.                                     v.aaData.push(H)
  1020.                                 }
  1021.                             }
  1022.                         });
  1023.                         v.recordsTotal = v.out_cunt = v.recordsFiltered = F !== "" ? D : dataSet[j.toolID].length;
  1024.                         this.rowsCount = v.aaData.length;
  1025.                         E(v)
  1026.                     }
  1027.                 };
  1028.                 if (k(j.toolID)) {
  1029.                     q.fixedColumns = true;
  1030.                     q.scrollY = true;
  1031.                     q.scrollX = true;
  1032.                     q.scrollCollapse = true;
  1033.                     q.fixedColumns = {
  1034.                         leftColumns: 2
  1035.                     }
  1036.                 }
  1037.                 dt[j.toolID] = jQuery(j.toolID).DataTable(q);
  1038.                 var p = jQuery(".currency");
  1039.                 if (p.find("select").length == 0) {
  1040.                     var r = "";
  1041.                     jQuery.each(dictionary.currency, function(s, t) {
  1042.                         r += '<option value="' + t.id + '">' + t.text + "</option>\r\n"
  1043.                     });
  1044.                     p.append("<span>" + crtoolsVars.table_currency + ': </span><select class="form-control input-sm">' + r + "</select>");
  1045.                     p.find("select").on("change", function() {
  1046.                         h.initData(j)
  1047.                     })
  1048.                 }
  1049.             } else {
  1050.                 dt[j.toolID].rows().invalidate("data").draw(false)
  1051.             }
  1052.         });
  1053.  
  1054.         function k(p) {
  1055.             if (jQuery(p).width() < 1050) {
  1056.                 return true
  1057.             }
  1058.             return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)
  1059.         }
  1060.  
  1061.         function m(s, u, r, q, t) {
  1062.             var p = [t.SortOrder, {
  1063.                 fullName: t.FullName,
  1064.                 name: t.Name,
  1065.                 img: dictionary.cryptocompareUrl + t.ImageUrl
  1066.             }];
  1067.             jQuery.each(s, function(v, x) {
  1068.                 x = x.replaceAll(" ", "");
  1069.                 switch (x) {
  1070.                     case "price":
  1071.                         p.push(u.DISPLAY[r][q].PRICE);
  1072.                         break;
  1073.                     case "cap":
  1074.                         var w = u.DISPLAY[r][q].MKTCAP;
  1075.                         var z = "";
  1076.                         switch (w.substring(w.length - 1, w.length)) {
  1077.                             case "B":
  1078.                                 z = ",000,000,000";
  1079.                                 break;
  1080.                             case "M":
  1081.                                 z = ",000,000";
  1082.                                 break;
  1083.                             case "K":
  1084.                                 z = ",000";
  1085.                                 break
  1086.                         }
  1087.                         var y = w.indexOf(".");
  1088.                         if (v != -1) {
  1089.                             w = w.substring(0, y)
  1090.                         }
  1091.                         w += z;
  1092.                         if (w == "") {
  1093.                             w = u.DISPLAY[r][q].TOSYMBOL + " 0"
  1094.                         }
  1095.                         p.push(w);
  1096.                         break;
  1097.                     case "supply":
  1098.                         p.push(u.DISPLAY[r][q].SUPPLY);
  1099.                         break;
  1100.                     case "volume":
  1101.                         p.push(u.DISPLAY[r][q].VOLUME24HOURTO);
  1102.                         break;
  1103.                     case "change":
  1104.                         p.push(u.DISPLAY[r][q].CHANGEPCT24HOUR + " %");
  1105.                         break;
  1106.                     case "graph":
  1107.                         p.push("");
  1108.                         break
  1109.                 }
  1110.             });
  1111.             return p
  1112.         }
  1113.  
  1114.         function i(r, q) {
  1115.             var p = {
  1116.                 names: [{
  1117.                     title: crtoolsVars.table_number
  1118.                 }, {
  1119.                     title: crtoolsVars.table_name
  1120.                 }],
  1121.                 aoColumns: [{
  1122.                     bSortable: true,
  1123.                     sTitle: crtoolsVars.table_number
  1124.                 }, {
  1125.                     bSortable: true,
  1126.                     sTitle: crtoolsVars.table_name
  1127.                 }],
  1128.                 columnDefs: [{
  1129.                     createdCell: function(y, s, x, v) {
  1130.                         var u = '<div class="table-cell coin-ico"><img src="' + s.img + '" alt="' + s.fullName + '" style="width:25px;max-width: inherit;"></div><div class="table-cell coin-name"><span>' + s.fullName + "</span></div>";
  1131.                         var w = s.fullName.substring(s.fullName.indexOf("(") + 1, s.fullName.indexOf(")"));
  1132.                         if (q.base && (!q.coins || q.coins.indexOf(w) !== -1)) {
  1133.                             jQuery(y).html('<a href="/' + (q.base == "/" ? "" : q.base + "/") + w.toLowerCase() + '/">' + u + "</a>")
  1134.                         } else {
  1135.                             jQuery(y).html(u)
  1136.                         }
  1137.                         jQuery(y).addClass("left-side");
  1138.                         if (this.rowsCount - 1 == v) {
  1139.                             var t = this.dataTable().api().settings()[0].sTableId;
  1140.                             waitAjax(t)
  1141.                         }
  1142.                     },
  1143.                     targets: 1
  1144.                 }]
  1145.             };
  1146.             jQuery.each(r, function(s, t) {
  1147.                 t = t.replaceAll(" ", "");
  1148.                 if (t === "price") {
  1149.                     p.names.push({
  1150.                         title: crtoolsVars.table_price
  1151.                     });
  1152.                     p.aoColumns.push({
  1153.                         bSortable: true,
  1154.                         sTitle: crtoolsVars.table_price
  1155.                     })
  1156.                 } else {
  1157.                     if (t === "cap") {
  1158.                         p.names.push({
  1159.                             title: crtoolsVars.table_cap,
  1160.                             width: 150
  1161.                         });
  1162.                         p.aoColumns.push({
  1163.                             bSortable: true,
  1164.                             sTitle: crtoolsVars.table_cap
  1165.                         })
  1166.                     } else {
  1167.                         if (t === "supply") {
  1168.                             p.names.push({
  1169.                                 title: crtoolsVars.table_supply,
  1170.                                 width: 150
  1171.                             });
  1172.                             p.aoColumns.push({
  1173.                                 bSortable: true,
  1174.                                 sTitle: crtoolsVars.table_supply
  1175.                             })
  1176.                         } else {
  1177.                             if (t === "volume") {
  1178.                                 p.names.push({
  1179.                                     title: crtoolsVars.table_volume,
  1180.                                     width: 200
  1181.                                 });
  1182.                                 p.aoColumns.push({
  1183.                                     bSortable: true,
  1184.                                     sTitle: crtoolsVars.table_volume
  1185.                                 });
  1186.                                 p.columnDefs.push({
  1187.                                     render: function(v) {
  1188.                                         if (v) {
  1189.                                             var u = v.indexOf("-") >= 0 ? "red-text" : "green-text";
  1190.                                             return '<span class="' + u + '">' + v + "</span>"
  1191.                                         } else {
  1192.                                             return ""
  1193.                                         }
  1194.                                     },
  1195.                                     targets: s + 2
  1196.                                 })
  1197.                             } else {
  1198.                                 if (t === "change") {
  1199.                                     p.names.push({
  1200.                                         title: crtoolsVars.table_change,
  1201.                                         width: 200
  1202.                                     });
  1203.                                     p.aoColumns.push({
  1204.                                         bSortable: true,
  1205.                                         sTitle: crtoolsVars.table_change
  1206.                                     });
  1207.                                     p.columnDefs.push({
  1208.                                         render: function(v) {
  1209.                                             if (v) {
  1210.                                                 var u = v.indexOf("-") >= 0 ? "red-text" : "green-text";
  1211.                                                 return '<span class="' + u + '">' + v + "</span>"
  1212.                                             } else {
  1213.                                                 return ""
  1214.                                             }
  1215.                                         },
  1216.                                         targets: s + 2
  1217.                                     })
  1218.                                 } else {
  1219.                                     if (t === "graph") {
  1220.                                         p.names.push({
  1221.                                             title: crtoolsVars.table_graph,
  1222.                                             width: 250
  1223.                                         });
  1224.                                         p.aoColumns.push({
  1225.                                             bSortable: false,
  1226.                                             sTitle: crtoolsVars.table_graph,
  1227.                                             sWidth: "250px"
  1228.                                         });
  1229.                                         p.columnDefs.push({
  1230.                                             createdCell: function(y, u, x, v) {
  1231.                                                 var w = x[1].name;
  1232.                                                 jQuery.ajax({
  1233.                                                     url: dictionary.coinUrl + "histohour?fsym=" + w + "&tsym=" + l + "&limit=168&aggregate=1",
  1234.                                                     success: function(C) {
  1235.                                                         var F = [],
  1236.                                                             D = [];
  1237.                                                         var E, B;
  1238.                                                         if (C.Data[0] == null) {
  1239.                                                             jQuery(y).html("");
  1240.                                                             return
  1241.                                                         }
  1242.                                                         if (C.Data[0].close < C.Data[C.Data.length - 1].close) {
  1243.                                                             E = "#1e8b3b";
  1244.                                                             B = "#a8d1b2"
  1245.                                                         } else {
  1246.                                                             E = "#a11b09";
  1247.                                                             B = "#daa5a1"
  1248.                                                         }
  1249.                                                         jQuery.each(C.Data, function(I, H) {
  1250.                                                             var G = new Date(H.time * 1000);
  1251.                                                             F.push(G);
  1252.                                                             D.push(H.close)
  1253.                                                         });
  1254.                                                         var z = '<canvas class="myChart" height="50px" width="200px"></canvas>';
  1255.                                                         if (q.base && q.isGraph && (!q.coins || q.coins.indexOf(w) !== -1)) {
  1256.                                                             jQuery(y).html('<a href="/' + (q.base == "/" ? "" : q.base + "/") + w.toLowerCase() + '/">' + z + "</a>")
  1257.                                                         } else {
  1258.                                                             jQuery(y).html(z)
  1259.                                                         }
  1260.                                                         var A = new Chart(jQuery(y).find(".myChart"), {
  1261.                                                             type: "line",
  1262.                                                             data: {
  1263.                                                                 labels: F,
  1264.                                                                 datasets: [{
  1265.                                                                     data: D
  1266.                                                                 }]
  1267.                                                             },
  1268.                                                             options: {
  1269.                                                                 elements: {
  1270.                                                                     point: {
  1271.                                                                         radius: 0
  1272.                                                                     },
  1273.                                                                     line: {
  1274.                                                                         borderColor: E,
  1275.                                                                         backgroundColor: B
  1276.                                                                     }
  1277.                                                                 },
  1278.                                                                 scales: {
  1279.                                                                     xAxes: [{
  1280.                                                                         display: false
  1281.                                                                     }],
  1282.                                                                     yAxes: [{
  1283.                                                                         display: false
  1284.                                                                     }]
  1285.                                                                 },
  1286.                                                                 legend: {
  1287.                                                                     display: false
  1288.                                                                 },
  1289.                                                                 responsive: false,
  1290.                                                                 display: false,
  1291.                                                                 tooltips: {
  1292.                                                                     enabled: false
  1293.                                                                 }
  1294.                                                             }
  1295.                                                         });
  1296.                                                         jQuery(window).trigger("resize")
  1297.                                                     },
  1298.                                                     error: function() {
  1299.                                                         jQuery(y).html("")
  1300.                                                     }
  1301.                                                 })
  1302.                                             },
  1303.                                             targets: s + 2
  1304.                                         })
  1305.                                     }
  1306.                                 }
  1307.                             }
  1308.                         }
  1309.                     }
  1310.                 }
  1311.             });
  1312.             return p
  1313.         }
  1314.     }
  1315. };
Advertisement
Add Comment
Please, Sign In to add comment