Added option to forget temporary settings immediately whenever NoScript gets updated.
This commit is contained in:
parent
2905a6a543
commit
8e694a603c
|
@ -228,6 +228,10 @@
|
|||
"OptIncognitoPerm": {
|
||||
"message": "Enable setting permanent permissions in incognito/private tabs.\nBEWARE: doing this can leak site information!"
|
||||
},
|
||||
"OptAmnesticUpdates": {
|
||||
"message": "Always forget temporary permissions across NoScript updates immediately, even if the browsers is not restarted"
|
||||
},
|
||||
|
||||
"KeepLocked": {
|
||||
"message": "Keep this element locked (recommended)"
|
||||
},
|
||||
|
|
|
@ -8,6 +8,7 @@ var Defaults = {
|
|||
showCtxMenuItem: true,
|
||||
showCountBadge: true,
|
||||
showFullAddresses: false,
|
||||
amnesticUpdates: false,
|
||||
},
|
||||
sync: {
|
||||
global: false,
|
||||
|
|
|
@ -194,6 +194,10 @@ var LifeCycle = (() => {
|
|||
|
||||
async onUpdateAvailable(details) {
|
||||
try {
|
||||
if (ns.local.amnesticUpdates) {
|
||||
// user doesn't want us to remember temporary settings across updates: bail out
|
||||
return;
|
||||
}
|
||||
await include("/lib/Ver.js");
|
||||
if (Ver.is(details.version, "<", browser.runtime.getManifest().version)) {
|
||||
// downgrade: temporary survival might not be supported, and we don't care
|
||||
|
|
|
@ -124,6 +124,13 @@
|
|||
</span>
|
||||
</div>
|
||||
|
||||
<div id="update-options" class="opt-group">
|
||||
<span id="amnesticUpdates-opt">
|
||||
<input type="checkbox" id="opt-amnesticUpdates">
|
||||
<label for="opt-amnesticUpdates" id="lbl-opt-amnesticUpdates">__MSG_OptAmnesticUpdates__</label>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<section id="debug" class="browser-style">
|
||||
<div class="opt-group">
|
||||
<span><input type="checkbox" id="opt-debug"><label id="label-debug" for="opt-debug">Debug</label></span>
|
||||
|
|
|
@ -38,6 +38,8 @@
|
|||
|
||||
opt("overrideTorBrowserPolicy");
|
||||
|
||||
opt("amnesticUpdates", "local");
|
||||
|
||||
{
|
||||
document.querySelector("#btn-reset").addEventListener("click", async () => {
|
||||
if (confirm(_("reset_warning"))) {
|
||||
|
|
Loading…
Reference in New Issue