Skip to content

Commit

Permalink
Final changes for version 1.0.0
Browse files Browse the repository at this point in the history
- Change names of the category selections, now more clear what it does.
- Some layout and locale changes. Further condensing of the options list
- Fix centering of the cookie configuration list items.
- Bump version in manifest to 1.0.0
  • Loading branch information
dibollinger committed Mar 15, 2022
1 parent f3a67eb commit 8405ffa
Show file tree
Hide file tree
Showing 8 changed files with 48 additions and 41 deletions.
16 changes: 8 additions & 8 deletions src/_locales/de/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
},

"firstTimeDescPG2": {
"message": "Um Ihre Privatsphäre zu schützen, können Sie unten die Arten von Cookies auswählen, welche sie erlauben möchten. Sollte eine Website dadurch nicht mehr funktionieren, dann beschreiben Sie uns das Problem, und wir werden es bestmöglich versuchen zu korrigieren.",
"message": "Um Ihre Privatsphäre zu schützen, können Sie unten die Arten von Cookies auswählen, welche sie erlauben möchten. Diese Einstellungen lassen sich zu beliebiger Zeit anpassen. Sollte eine Website dadurch nicht mehr funktionieren, dann beschreiben Sie uns das Problem, und wir werden es bestmöglich versuchen zu korrigieren.",
"description": "Description paragraph 2 seen on the first time setup page."
},

Expand All @@ -60,22 +60,22 @@
},

"catNecessaryTitle": {
"message": "Strikt-Notwendige Cookies",
"message": "Strikt-Notwendige Cookies werden akzeptiert",
"description": "Text next to the 'Necessary' checkbox."
},

"catFunctionalityTitle": {
"message": "Funktionalitäts-Cookies",
"message": "Funktionalitäts-Cookies werden akzeptiert",
"description": "Text next to the 'Functionality' checkbox."
},

"catAnalyticsTitle" : {
"message": "Analytische Cookies",
"message": "Analytische Cookies werden akzeptiert",
"description": "Text next to the 'Analytics' checkbox."
},

"catAdvertisingTitle": {
"message": "Werbungs- und Tracking-Cookies",
"message": "Werbungs- und Tracking-Cookies werden akzeptiert",
"description": "Text next to the 'Advertising' checkbox."
},

Expand Down Expand Up @@ -120,7 +120,7 @@
},

"buttonExitSetup" : {
"message": "Gespeicherte Cookies Kategorisieren und Entfernen",
"message": "Gespeicherte Cookies kategorisieren und entfernen",
"description": "Label for the close button on the first time setup"
},

Expand Down Expand Up @@ -175,7 +175,7 @@
},

"currentCookieEnforceButton" : {
"message" : "Kategorisieren und Entfernen",
"message" : "Kategorisieren und entfernen",
"description" : "Label on the button that performs the current cookie classification."
},

Expand Down Expand Up @@ -504,7 +504,7 @@
},

"udButton": {
"message": "Cookie Konfiguration Öffnen",
"message": "Cookie Konfiguration öffnen",
"description": "Button in the options page that opens the cookie config page"
},

Expand Down
14 changes: 7 additions & 7 deletions src/_locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
},

"feedbackPG1": {
"message": "To report a broken website or give us feedback, you can use the following link:",
"message": "To report a broken website or give us feedback, use the following link:",
"description": "Feedback text pointing towards the Google Forms survey."
},

Expand All @@ -45,7 +45,7 @@
},

"firstTimeDescPG2": {
"message": "Select the types of cookies you want to permit below. Note that the extension may make mistakes and can occasionally break website functionality. If this occurs, please report the issue so we can resolve the problem.",
"message": "Select the types of cookies you want to permit below. All of these options can be changed later. Note that the extension may make mistakes and can occasionally break website functionality. If this occurs, please report the issue so we can resolve the problem.",
"description": "Description paragraph 2 seen on the first time setup page."
},

Expand All @@ -60,22 +60,22 @@
},

"catNecessaryTitle": {
"message": "Strictly-Necessary Cookies",
"message": "Allow Strictly-Necessary Cookies",
"description": "Text next to the 'Necessary' checkbox."
},

"catFunctionalityTitle": {
"message": "Functionality Cookies",
"message": "Allow Functionality Cookies",
"description": "Text next to the 'Functionality' checkbox."
},

"catAnalyticsTitle" : {
"message": "Analytics Cookies",
"message": "Allow Analytics Cookies",
"description": "Text next to the 'Analytics' checkbox."
},

"catAdvertisingTitle": {
"message": "Advertising/Tracking Cookies",
"message": "Allow Advertising/Tracking Cookies",
"description": "Text next to the 'Advertising' checkbox."
},

Expand Down Expand Up @@ -414,7 +414,7 @@
},

"cookieConfigListTitle" : {
"message": "Current Cookies",
"message": "Known Cookies",
"description": "Header for the cookie list."
},

Expand Down
2 changes: 1 addition & 1 deletion src/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "__MSG_extensionName__",
"author": "Information Security Group, ETH Zurich",
"homepage_url": "https://github.com/dibollinger/CookieBlock",
"version": "0.9.0",
"version": "1.0.0",
"incognito": "spanning",
"default_locale": "en",

Expand Down
7 changes: 7 additions & 0 deletions src/options/cookieblock_cconfig.css
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,11 @@ hr.thick {
width: 25em;
}

.cconfig-title-element {
margin-top: 0.5em;
margin-bottom: 0.75em;
}

.cconfig-desc {
display: inline;
margin-top: 1.3em;
Expand All @@ -162,6 +167,8 @@ hr.thick {
}

.cookie-name {
display:flex;
align-items: center;
float:left;
width:28em;
text-overflow: ellipsis;
Expand Down
6 changes: 3 additions & 3 deletions src/options/cookieblock_cconfig.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ <h2 id="cconfig-subtitle"></h2>

<div class="contents">
<div class="config-div">
<fieldset>
<fieldset style="margin-top: 0.7em;">
<legend id="cconfig-desc-title" class="cconfig-title-element"></legend>
<div class="cconfig-desc">
<p id="cconfig-desc-pg1"></p>
<p id="cconfig-desc-pg2"></p>
<p id="cconfig-desc-pg1" style="margin-block-start: 0.7em; margin-block-end: 0.7em;"></p>
<p id="cconfig-desc-pg2" style="margin-block-start: 0.7em; margin-block-end: 0.7em;"></p>
</div>
</fieldset>
</div>
Expand Down
25 changes: 17 additions & 8 deletions src/options/cookieblock_cconfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,10 @@ const constructCookieListEntry = function(cookies) {
let domainDiv = document.createElement("div");
domainDiv.className = "cookie-name";
domainDiv.textContent = c.name;
let buttonDiv = document.createElement("div");
buttonDiv.style = "display: flex; align-items:center;"
subListItem.appendChild(domainDiv);
subListItem.appendChild(buttonDiv);

let selection = document.createElement("select");
selection.className = "cat-selector";
Expand All @@ -177,11 +180,11 @@ const constructCookieListEntry = function(cookies) {
selection.add(option);
}
selection.addEventListener("change", (ev) => { updateLabel(c, ev.target); });
subListItem.appendChild(selection);
buttonDiv.appendChild(selection);

let button = document.createElement("button");
button.className = "item-button";
subListItem.appendChild(button);
buttonDiv.appendChild(button);
(async () => {
if (await existsCookie(c)){
button.textContent = chrome.i18n.getMessage("configButtonRemove");
Expand Down Expand Up @@ -238,14 +241,15 @@ const constructPlaceholderEntry = function() {
}

const constructDomainListEntry = function(domain, path, cookies) {

// First construct the domain entry
let listEntry = document.createElement("li");
let domainDiv = document.createElement("div");
domainDiv.className = "domain-entry";
domainDiv.style.fontWeight = "bold";
domainDiv.textContent = domain + path;

let buttonDiv = document.createElement("div");
buttonDiv.style = "display: flex;align-items:center;height: 4em;";

let optionFalse = document.createElement("option");
optionFalse.value = false;
optionFalse.textContent = chrome.i18n.getMessage("configDropdownFalse")
Expand Down Expand Up @@ -276,17 +280,21 @@ const constructDomainListEntry = function(domain, path, cookies) {
await refreshButtons();
});

buttonDiv.appendChild(selection);
buttonDiv.appendChild(button);
listEntry.appendChild(domainDiv);
listEntry.appendChild(selection);
listEntry.appendChild(button);
listEntry.appendChild(buttonDiv);

listEntry.style="vertical-align: middle;";
domainListElem.appendChild(listEntry);

let placeholder = document.createElement("li");
placeholder.style.display = "none";
domainListElem.appendChild(placeholder);

let objectCache = { "placeholder": placeholder, "listEntry": null };
domainDiv.addEventListener("click", () => {
let onclickDomainEntry = function()
{
if (!objectCache.listEntry) {
objectCache.listEntry = constructCookieListEntry(cookies);
}
Expand All @@ -296,7 +304,8 @@ const constructDomainListEntry = function(domain, path, cookies) {
} else {
objectCache.placeholder.replaceWith(objectCache.listEntry);
}
});
}
domainDiv.addEventListener("click", onclickDomainEntry);
}


Expand Down
17 changes: 5 additions & 12 deletions src/options/cookieblock_options.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,12 @@ <h2 id="settings_subtitle"></h2>
</div>

<div class="contents">
<div class="description">
<div id="options-greet" style="font-size: 1.75em; font-weight: bold;"></div>
<div class="overview_description">
<p id="options-desc1"></p>
<p id="options-desc2"></p>
<p id="feedback-pg1" style="font-weight: bold;"></p>
<a id="feedback-survey" href="https://forms.gle/tL21ruvPZq2q218P8">https://forms.gle/tL21ruvPZq2q218P8</a>
<p id="feedback-pg2" style="font-weight: bold;"></p>
<a id="feedback-mail" href="https://github.com/dibollinger/CookieBlock">https://github.com/dibollinger/CookieBlock</a>
</div>
</div>
<hr class="thick">
<div class="settings_group">
<p id="feedback-pg1" style="font-weight: bold;"></p>
<a id="feedback-survey" href="https://forms.gle/tL21ruvPZq2q218P8">https://forms.gle/tL21ruvPZq2q218P8</a>
<p id="feedback-pg2" style="font-weight: bold;"></p>
<a id="feedback-mail" href="https://github.com/dibollinger/CookieBlock">https://github.com/dibollinger/CookieBlock</a>
<hr class="thin">
<fieldset class="preference_form">
<legend id="cprefs_legend" style="margin-top: .75em;"></legend>
<div id="cprefs_desc" class="overview_description"></div>
Expand Down
2 changes: 0 additions & 2 deletions src/options/cookieblock_options.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,6 @@ const setupLocalization = function () {
setStaticLocaleText("settings_subtitle", "settingsSubtitle");

// Description
setStaticLocaleText("options-desc1","firstTimeDescPG1");
setStaticLocaleText("options-desc2","firstTimeDescPG2");
setStaticLocaleText("feedback-pg1","feedbackPG1");
setStaticLocaleText("feedback-pg2","feedbackPG2");

Expand Down

0 comments on commit 8405ffa

Please sign in to comment.