aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Moisseev <moiseev@mezonplus.ru>2018-09-17 13:45:18 +0300
committerAlexander Moisseev <moiseev@mezonplus.ru>2018-09-17 13:45:18 +0300
commit731af4c2a3f1052a3393d22f9ca6703821fd4429 (patch)
tree36ade9d697cc92a13201ac4b7b79ffe3c7ef4626
parent954727f41c7ed5449206f035d4015d30b6c92f13 (diff)
downloadrspamd-731af4c2a3f1052a3393d22f9ca6703821fd4429.tar.gz
rspamd-731af4c2a3f1052a3393d22f9ca6703821fd4429.zip
[Minor] Remove extra parentheses
-rw-r--r--interface/js/app/config.js4
-rw-r--r--interface/js/app/graph.js2
-rw-r--r--interface/js/app/history.js4
-rw-r--r--interface/js/app/rspamd.js2
-rw-r--r--interface/js/app/symbols.js4
5 files changed, 8 insertions, 8 deletions
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 = $("<tbody>");
$.each(data, function (i, item) {
- var label = ((item.editable === false || rspamd.read_only))
+ var label = (item.editable === false || rspamd.read_only)
? "<span class=\"label label-default\">Read</span>"
: "<span class=\"label label-default\">Read</span>&nbsp;<span class=\"label label-success\">Write</span>";
var $tr = $("<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 = [];