Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions _locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -419,5 +419,8 @@
},
"editThis_SameSite_Strict": {
"message": "Strict"
},
"editThis_autoURLDecode": {
"message": "Automatically decode URL-encoded cookies"
}
}
3 changes: 3 additions & 0 deletions _locales/it/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -407,5 +407,8 @@
},
"editThis_Details": {
"message": "Dettagli"
},
"editThis_autoURLDecode": {
"message": "Decodifica automaticamente i cookie in formato \"URL-encoding\""
}
}
4 changes: 4 additions & 0 deletions js/data.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ var preferences_template = {
// Whether to show the panel in the DevTools panel (e.g. panel shown when pressing F12)
"showDevToolsPanel": {
"default_value": true
},
// Whether to display the cookies URL-decoded
"autoURLDecode": {
"default_value": false
}
};

Expand Down
21 changes: 17 additions & 4 deletions js/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,21 +239,34 @@ function createAccordionList(cks, callback, callbackArguments) {
}

var titleText;

var nameText;
if(preferences.autoURLDecode){
nameText = decodeURIComponent(currentC.name);
} else {
nameText = currentC.name;
}
if (preferences.showDomainBeforeName) {
titleText = $("<p/>").text(domainText).append($("<b/>").text(currentC.name));
titleText = $("<p/>").text(domainText).append($("<b/>").text(nameText));
if (currentC.isProtected)
$(":first-child", titleText).css("color", "green");
} else {
titleText = $("<p/>").append($("<b/>").text(currentC.name)).append($("<span/>").text(domainText));
titleText = $("<p/>").append($("<b/>").text(nameText)).append($("<span/>").text(domainText));
}

var titleElement = $("<h3/>").append($("<a/>").html(titleText.html()).attr("href", "#"));

var cookie = $(".cookie_details_template").clone().removeClass("cookie_details_template");

$(".index", cookie).val(i);
$(".name", cookie).val(currentC.name);
$(".value", cookie).val(currentC.value);
$(".name", cookie).val(nameText);

if(preferences.autoURLDecode)
$(".value", cookie).val(decodeURIComponent(currentC.value));
else
$(".value", cookie).val(currentC.value);


$(".domain", cookie).val(currentC.domain);
$(".path", cookie).val(currentC.path);
$(".storeId", cookie).val(currentC.storeId);
Expand Down
4 changes: 4 additions & 0 deletions options_pages/user_preferences.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ <h1 i18n="Options"></h1>
<input type="checkbox" class="checkbox" id="showCommandsLabels" />
<label for="showCommandsLabels" class="formLabel" i18n="ShowCommandsLabels"></label>
</div>
<div class="formLine">
<input type="checkbox" class="checkbox" id="autoURLDecode" />
<label for="autoURLDecode" class="formLabel" i18n="autoURLDecode"></label>
</div>
<div class="formLine">
<input type="checkbox" class="checkbox" id="refreshAfterSubmit" />
<label for="refreshAfterSubmit" class="formLabel" i18n="reloadAfterChanges"></label>
Expand Down
4 changes: 4 additions & 0 deletions options_pages/user_preferences.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ function setOptions() {
$(':checkbox', '#options-box').removeAttr('checked');
$("#justDelete").prop('checked', preferences.justDelete);
$("#showAlerts").prop('checked', preferences.showAlerts);
$("#autoURLDecode").prop('checked', preferences.autoURLDecode);
$("#showDomain").prop('checked', preferences.showDomain);
$("#showContextMenu").prop('checked', preferences.showContextMenu);
$("#showFlagAndDeleteAll").prop('checked', preferences.showFlagAndDeleteAll);
Expand Down Expand Up @@ -80,6 +81,9 @@ function setEvents() {
$("#showAlerts").click(function () {
preferences.showAlerts = $('#showAlerts').prop("checked");
});
$("#autoURLDecode").click(function () {
preferences.autoURLDecode = $('#autoURLDecode').prop("checked");
});
$("#showDomain").click(function () {
preferences.showDomain = $('#showDomain').prop("checked");
$("#showDomainBeforeName").prop("disabled", !preferences.showDomain);
Expand Down