From: Alexander Moisseev Date: Mon, 17 Sep 2018 10:45:18 +0000 (+0300) Subject: [Minor] Remove extra parentheses X-Git-Tag: 1.8.0~84^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=refs%2Fpull%2F2489%2Fhead;p=rspamd.git [Minor] Remove extra parentheses --- diff --git a/interface/js/app/config.js b/interface/js/app/config.js index 58132dc41..5ab24f9ef 100644 --- a/interface/js/app/config.js +++ b/interface/js/app/config.js @@ -145,7 +145,7 @@ define(["jquery"], var $tbody = $(""); $.each(data, function (i, item) { - var label = ((item.editable === false || rspamd.read_only)) + var label = (item.editable === false || rspamd.read_only) ? "Read" : "Read Write"; var $tr = $(""); @@ -179,7 +179,7 @@ define(["jquery"], success: function (data) { var disabled = ""; var text = data[0].data; - if ((item.editable === false || rspamd.read_only)) { + if (item.editable === false || rspamd.read_only) { disabled = "disabled=\"disabled\""; } diff --git a/interface/js/app/graph.js b/interface/js/app/graph.js index 319ccda9e..bdd4da3fb 100644 --- a/interface/js/app/graph.js +++ b/interface/js/app/graph.js @@ -244,7 +244,7 @@ define(["jquery", "d3evolution", "footable"], action.map(function (d, i) { return { x: d.x, - y: ((res[j][i].y === null) ? d.y : res[j][i].y + d.y) + y: (res[j][i].y === null) ? d.y : res[j][i].y + d.y }; }) ); diff --git a/interface/js/app/history.js b/interface/js/app/history.js index 21a6edfc0..1aab72456 100644 --- a/interface/js/app/history.js +++ b/interface/js/app/history.js @@ -45,7 +45,7 @@ define(["jquery", "footable", "humanize"], var symbolDescriptions = {}; var escapeHTML = function (string) { - return (String(string)).replace(htmlEscaper, function (match) { + return String(string).replace(htmlEscaper, function (match) { return htmlEscapes[match]; }); }; @@ -83,7 +83,7 @@ define(["jquery", "footable", "humanize"], }); break; default: - if (typeof (item[prop]) === "string") { + if (typeof item[prop] === "string") { item[prop] = escapeHTML(item[prop]); } } diff --git a/interface/js/app/rspamd.js b/interface/js/app/rspamd.js index ecd82aad5..1d41bd85b 100644 --- a/interface/js/app/rspamd.js +++ b/interface/js/app/rspamd.js @@ -210,7 +210,7 @@ function ($, D3pie, visibility, NProgress, tab_stat, tab_graph, tab_config, function errorMessage() { alertMessage("alert-error", neighbours_status[ind].name + " > " + (o.errorMessage ? o.errorMessage : "Request failed") + - (errorThrown ? (": " + errorThrown) : "")); + (errorThrown ? ": " + errorThrown : "")); } if (o.error) { o.error(neighbours_status[ind], diff --git a/interface/js/app/symbols.js b/interface/js/app/symbols.js index 4902efd17..327fb3bf2 100644 --- a/interface/js/app/symbols.js +++ b/interface/js/app/symbols.js @@ -59,8 +59,8 @@ define(["jquery", "footable"], }); } function decimalStep(number) { - var digits = ((Number(number)).toFixed(20)).replace(/^-?\d*\.?|0+$/g, "").length; - return (digits === 0 || digits > 4) ? 0.1 : 1.0 / (Math.pow(10, digits)); + var digits = Number(number).toFixed(20).replace(/^-?\d*\.?|0+$/g, "").length; + return (digits === 0 || digits > 4) ? 0.1 : 1.0 / Math.pow(10, digits); } function process_symbols_data(data) { var items = [];