Skip to content

Commit

Permalink
Update for Chrome broken log display
Browse files Browse the repository at this point in the history
- Chrome log display was broken, resolved
  • Loading branch information
jrie committed Dec 29, 2017
1 parent e9e71ca commit 0bb820d
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions flagCookies.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,14 +203,18 @@ function updateUIData (data, cookies) {
if (data['flagCookies'] !== undefined && data['flagCookies']['logData'] !== '') {
let log = document.getElementById('log')
for (let entry of data['flagCookies']['logData']) {
if (entry.indexOf(domainURL) !== -1) log.textContent += entry + '\n'
if (entry.indexOf(domainURL) !== -1) {
log.textContent += entry + '\n'
}
}
}
}

function isDomainCookieInList (targetList, cookieKey) {
for (let child of targetList.children) {
if (child.children[0].dataset['name'] === cookieKey) return true
if (child.children[0].dataset['name'] === cookieKey) {
return true
}
}

return false
Expand Down Expand Up @@ -295,7 +299,9 @@ async function flaggedCookieSwitchNeutral (data, event) {

if (useChrome) {
setChromeStorage(data)
if (!checkChromeHadNoErrors()) return
if (!checkChromeHadNoErrors()) {
return
}
} else await browser.storage.local.set(data)
break
}
Expand Down Expand Up @@ -350,7 +356,9 @@ async function permittedCookieSwitchNeutral (data, event) {

if (useChrome) {
setChromeStorage(data)
if (!checkChromeHadNoErrors()) return
if (!checkChromeHadNoErrors()) {
return
}
} else await browser.storage.local.set(data)
break
}
Expand Down

0 comments on commit 0bb820d

Please sign in to comment.