From 33b1b3d3bc68ce611ec8876c1745402a53d759e7 Mon Sep 17 00:00:00 2001 From: Matt Simerson Date: Tue, 12 Dec 2023 20:47:46 -0800 Subject: [PATCH] style: remove useless variable --- .release | 2 +- index.js | 30 ++++++++++++++---------------- 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/.release b/.release index 9be2b27..0890e94 160000 --- a/.release +++ b/.release @@ -1 +1 @@ -Subproject commit 9be2b270ef836bcfefda085674bf62e2a91defe8 +Subproject commit 0890e945e4e061c96c7b2ab45017525904c17728 diff --git a/index.js b/index.js index d19d85c..b296ee1 100644 --- a/index.js +++ b/index.js @@ -7,9 +7,8 @@ let log = '/var/log/haraka.log'; let plugin; exports.register = function () { - plugin = this; - plugin.get_logreader_ini(); - plugin.load_karma_ini(); + this.get_logreader_ini(); + this.load_karma_ini(); } exports.hook_init_http = function (next, server) { @@ -166,11 +165,11 @@ exports.asHtml = function (uuid, matched, done) { } // exports.grepWithFs = function (file, regex, done) { -// var wantsRe = new RegExp(regex); -// var fsOpts = { flag: 'r', encoding: 'utf8' }; +// const wantsRe = new RegExp(regex); +// const fsOpts = { flag: 'r', encoding: 'utf8' }; // require('fs').readFile(log, fsOpts, function (err, data) { // if (err) throw (err); -// var res = ''; +// let res = ''; // data.toString().split(/\n/).forEach(function (line) { // if (wantsRe && !wantsRe.test(line)) return; // res += line + '\n'; @@ -229,16 +228,15 @@ function sortByAward (a, b) { } function htmlHead () { - const str = ' \ - \ - \ - \ - \ - \ - '; - return str; + return ' \ + \ + \ + \ + \ + \ + '; } function htmlBody (uuid, awards, resolve) {