From c2dc09f034b1d75c734e05481cc2e75c18d5e969 Mon Sep 17 00:00:00 2001 From: OllieJC Date: Fri, 4 Mar 2022 15:15:21 +0000 Subject: [PATCH] linted --- background/background.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/background/background.js b/background/background.js index f821e96..966e628 100644 --- a/background/background.js +++ b/background/background.js @@ -13,9 +13,8 @@ export function checkIp (details) { !/\.[a-z]/i.test(hostname) || hostname.indexOf(':') > -1 ) ) { - let shouldSkip = false - let ipRules = rules.getRules(true) - for (var i = 0; i < ipRules.length; i++) { + const ipRules = rules.getRules(true) + for (let i = 0; i < ipRules.length; i++) { if (ipRules[i][1].test(hostname)) { if (ipRules[i][0] === 'allow') { break @@ -30,7 +29,7 @@ export function checkIp (details) { if (cancel) { console.log(`no-direct-ip: blocked access to: ${hostname}`) if (typeof (browser) !== 'undefined') { - let url = browser.runtime.getURL('resources/blocked.html?hostname=' + hostname) + const url = browser.runtime.getURL('resources/blocked.html?hostname=' + hostname) return { redirectUrl: url } } }