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