diff --git a/cookies.js b/cookies.js index 63d9243..f9c5128 100755 --- a/cookies.js +++ b/cookies.js @@ -322,16 +322,24 @@ async function clearCookiesAction (action, data, cookies, domainURL) { } } } else { + if (data[domainURL] === undefined) { + return + } + for (let cookie of cookieData[domainURL]) { - if (hasProfile && hasLogged && data['flagCookies_logged'][domainURL][cookie.name] !== undefined) { - let msg = "Allowed profile cookie on '" + action + "', cookie: '" + cookie.name + "' for '" + domainURL + "'" + if (data[domainURL][cookie.name] === undefined) { + continue + } + + if (data[domainURL][cookie.name] === false) { + let msg = "Permitted cookie on '" + action + "', cookie: '" + cookie.name + "' for '" + domainURL + "'" addToLogData(msg) if (hasConsole) console.log(msg) continue } - if (data[domainURL] !== undefined && data[domainURL][cookie.name] !== undefined && data[domainURL][cookie.name] === false) { - let msg = "Permitted cookie on '" + action + "', cookie: '" + cookie.name + "' for '" + domainURL + "'" + if (hasProfile && hasLogged && data['flagCookies_logged'][domainURL][cookie.name] !== undefined) { + let msg = "Allowed profile cookie on '" + action + "', cookie: '" + cookie.name + "' for '" + domainURL + "'" addToLogData(msg) if (hasConsole) console.log(msg) continue diff --git a/manifest.json b/manifest.json index 315dc65..5c15d30 100644 --- a/manifest.json +++ b/manifest.json @@ -31,7 +31,7 @@ "homepage_url": "https://github.com/jrie/flagCookies", "manifest_version": 2, "name": "Flag Cookies", - "version": "1.6.8", + "version": "1.6.9", "permissions": ["cookies", "tabs", "webNavigation", "", "storage", "unlimitedStorage"], "background": { "scripts": [