Skip to content

Commit

Permalink
linted
Browse files Browse the repository at this point in the history
  • Loading branch information
OllieJC committed Mar 4, 2022
1 parent b10f207 commit c2dc09f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions background/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }
}
}
Expand Down

0 comments on commit c2dc09f

Please sign in to comment.