From ba88b8210ab98ae35fcbf3ff950afe552286c815 Mon Sep 17 00:00:00 2001 From: Matthias Held Date: Fri, 7 Sep 2018 17:49:11 +0200 Subject: Fix variable type string => integer --- js/filelist.js | 20 ++++++++++---------- js/scan.js | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) (limited to 'js') diff --git a/js/filelist.js b/js/filelist.js index c43ebf6..245a749 100644 --- a/js/filelist.js +++ b/js/filelist.js @@ -424,13 +424,13 @@ }).text(simpleSize)); tr.append(td); - if (fileData.fileClass === '1') { + if (fileData.fileClass === 1) { // encrypted td = $('').append($('

').attr({"title": "ENCRYPTED"}).tooltip({placement: 'top'}).prepend('')); - } else if (fileData.fileClass === '2') { + } else if (fileData.fileClass === 2) { // compressed td = $('').append($('

').attr({"title": "COMPRESSED"}).tooltip({placement: 'top'}).prepend('')); - } else if (fileData.fileClass === '3') { + } else if (fileData.fileClass === 3) { // normal td = $('').append($('

').attr({"title": "NORMAL"}).tooltip({placement: 'top'}).prepend('')); } else { @@ -439,10 +439,10 @@ } tr.append(td); - if (fileData.fileExtensionClass === '0') { + if (fileData.fileExtensionClass === 0) { // normal td = $('').append($('

').attr({"title": "NOT_SUSPICIOUS"}).tooltip({placement: 'top'}).prepend('')); - } else if (fileData.fileExtensionClass === '1') { + } else if (fileData.fileExtensionClass === 1) { // suspicious td = $('').append($('

').attr({"title": "SUSPICIOUS"}).tooltip({placement: 'top'}).prepend('')); } else { @@ -585,13 +585,13 @@ }).text(simpleSize)); tr.append(td); - if (fileData.fileClass === '1') { + if (fileData.fileClass === 1) { // encrypted td = $('').append($('

').attr({"title": "ENCRYPTED"}).tooltip({placement: 'top'}).prepend('')); - } else if (fileData.fileClass === '2') { + } else if (fileData.fileClass === 2) { // compressed td = $('').append($('

').attr({"title": "COMPRESSED"}).tooltip({placement: 'top'}).prepend('')); - } else if (fileData.fileClass === '3') { + } else if (fileData.fileClass === 3) { // normal td = $('').append($('

').attr({"title": "NORMAL"}).tooltip({placement: 'top'}).prepend('')); } else { @@ -600,10 +600,10 @@ } tr.append(td); - if (fileData.fileExtensionClass === '0') { + if (fileData.fileExtensionClass === 0) { // not suspicious td = $('').append($('

').attr({"title": "NOT_SUSPICIOUS"}).tooltip({placement: 'top'}).prepend('')); - } else if (fileData.fileExtensionClass === '1') { + } else if (fileData.fileExtensionClass === 1) { // suspicious td = $('').append($('

').attr({"title": "SUSPICIOUS"}).tooltip({placement: 'top'}).prepend('')); } else { diff --git a/js/scan.js b/js/scan.js index b5be947..453ce40 100644 --- a/js/scan.js +++ b/js/scan.js @@ -444,7 +444,7 @@ if (fileData.fileExtensionClass === 0) { // not suspicious td = $('').append($('

').attr({"title": "NOT_SUSPICIOUS"}).tooltip({placement: 'top'}).prepend('')); - } else if (fileData.fileExtensionClass === 3) { + } else if (fileData.fileExtensionClass === 1) { // suspicious td = $('').append($('

').attr({"title": "SUSPICIOUS"}).tooltip({placement: 'top'}).prepend('')); } else { -- cgit v1.2.3