From a5c71ed6f23010b723ee748eca7b76e27e5dd3d7 Mon Sep 17 00:00:00 2001 From: "jan@dwrox.net" Date: Sun, 1 Sep 2019 08:36:53 +0200 Subject: [PATCH] Release 3.0.52 - "www."-Domain-Fix --- cookies.css | 16 ++++++++-------- cookies.js | 12 ++++++------ manifest.json | 2 +- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/cookies.css b/cookies.css index b8728f2..a1172f9 100755 --- a/cookies.css +++ b/cookies.css @@ -288,22 +288,22 @@ li.cookieEntry.hidden { .dark li.cookieEntry:hover .cookieKey, .dark li.cookieEntry:hover .cookieValue, .dark li.cookieEntrySublist:hover .cookieKey, -.dark li.cookieEntrySublist:hover .cookieValue { +.dark li.cookieEntrySublist:hover .cookieValue, +li.cookieEntry.inactive-cookie:hover, +li.cookieEntrySublist.inactive-cookie:hover { color: #fff; } li.cookieEntry:hover .cookieValue, -li.cookieEntrySublist:hover .cookieValue { - color: #fff; -} - +li.cookieEntrySublist:hover .cookieValue, li.cookieEntry:hover .secure-cookie, -li.cookieEntry:hover .cookie-domain, +li.cookieEntry:hover .cookie-domain li.cookieEntrySublist:hover .secure-cookie, li.cookieEntrySublist:hover .cookie-domain { - color: #af2000; + color: #fff; } + .dark li.cookieEntry:hover .secure-cookie, .dark li.cookieEntry:hover .cookie-domain, .dark li.cookieEntrySublist:hover .secure-cookie, @@ -514,7 +514,7 @@ button#permittedCookies { background-color: #45a; color: #fff; font-size: 0.95em; - padding: 0px 7px 2px 7px; + padding: 4px 8px; position: absolute; top: 23px; right: -8px; diff --git a/cookies.js b/cookies.js index 858513d..0a0fca2 100644 --- a/cookies.js +++ b/cookies.js @@ -427,7 +427,7 @@ async function clearCookiesAction (action, data, cookies, domainURL, currentTab, if (data['flagCookies_autoFlag'] !== undefined && data['flagCookies_autoFlag'][contextName] !== undefined && urlInFlag) { for (let domainKey of Object.keys(cookieData[contextName][rootDomain])) { for (let cookie of cookieData[contextName][rootDomain][domainKey]) { - let cookieDomain = domainKey.startsWith('.') ? domainKey.replace('.', '') : domainKey + let cookieDomain = domainKey.startsWith('.') ? domainKey.replace('.', '') : domainKey.replace('www.', '') let startHttp = cookieDomain.startsWith('http') let isManagedCookieHttp = false let isManagedCookieHttps = false @@ -446,7 +446,7 @@ async function clearCookiesAction (action, data, cookies, domainURL, currentTab, if (cookieDomain === rootDomain) cookie['fgRoot'] = true else if (cookie['fgRoot'] !== undefined) delete cookie['fgRoot'] - if (accountDomain !== null && accountDomain.indexOf(cookieDomain) !== -1) { + if (accountDomain !== null && accountDomain.indexOf(cookieDomain.replace('www.', '')) !== -1) { cookie['fgProfile'] = true cookie['fgDomain'] = accountDomain } @@ -527,7 +527,7 @@ async function clearCookiesAction (action, data, cookies, domainURL, currentTab, if (useChrome) { let cookieDomainTrim - if (cookie.domain.startsWith('.')) cookieDomainTrim = cookie.domain.replace('.', '') + if (cookie.domain.startsWith('.')) cookieDomainTrim = cookie.domain.replace('.', '').replace('www.', '') else cookieDomainTrim = cookie.domain.replace('www.', '').replace(/(http|https):\/\//, '') let details = { url: 'https://' + cookieDomain + cookie.path, name: cookie.name } @@ -567,7 +567,7 @@ async function clearCookiesAction (action, data, cookies, domainURL, currentTab, let cookieDomainTrim - if (cookie.domain.startsWith('.')) cookieDomainTrim = cookie.domain.replace('.', '') + if (cookie.domain.startsWith('.')) cookieDomainTrim = cookie.domain.replace('.', '').replace('www.', '') else cookieDomainTrim = cookie.domain.replace('www.', '').replace(/(http|https):\/\//, '') let details = { url: 'https://' + cookieDomainTrim + cookie.path, name: cookie.name, storeId: activeCookieStore } @@ -623,7 +623,7 @@ async function clearCookiesAction (action, data, cookies, domainURL, currentTab, } else if (data['flagCookies_flagGlobal'] !== undefined && data['flagCookies_flagGlobal'][contextName] !== undefined && data['flagCookies_flagGlobal'][contextName] === true) { for (let domainKey of Object.keys(cookieData[contextName][rootDomain])) { for (let cookie of cookieData[contextName][rootDomain][domainKey]) { - let cookieDomain = domainKey.startsWith('.') ? domainKey.replace('.', '') : domainKey + let cookieDomain = domainKey.startsWith('.') ? domainKey.replace('.', '') : domainKey.replace('www.', '') let startHttp = cookieDomain.startsWith('http') let isManagedCookieHttp = false let isManagedCookieHttps = false @@ -819,7 +819,7 @@ async function clearCookiesAction (action, data, cookies, domainURL, currentTab, } else { for (let domainKey of Object.keys(cookieData[contextName][rootDomain])) { for (let cookie of cookieData[contextName][rootDomain][domainKey]) { - let cookieDomain = domainKey.startsWith('.') ? domainKey.replace('.', '') : domainKey + let cookieDomain = domainKey.startsWith('.') ? domainKey.replace('.', '') : domainKey.replace('www.', '') let startHttp = cookieDomain.startsWith('http') let isManagedCookieHttp = false let isManagedCookieHttps = false diff --git a/manifest.json b/manifest.json index 1934831..e82abd5 100644 --- a/manifest.json +++ b/manifest.json @@ -38,7 +38,7 @@ "homepage_url": "https://github.com/jrie/flagCookies", "manifest_version": 2, "name": "Flag Cookies", - "version": "3.0.51", + "version": "3.0.52", "permissions": ["cookies", "tabs", "webRequest", "", "storage", "unlimitedStorage", "notifications", "contextualIdentities"], "background": { "scripts": [