1
0
mirror of https://github.com/kkapsner/CanvasBlocker synced 2024-12-22 04:40:20 +01:00

Add button to reload extension if update pending

For #522
This commit is contained in:
kkapsner 2021-01-26 21:45:15 +01:00
parent 8e5986817e
commit a5558b4144
7 changed files with 38 additions and 1 deletions

View File

@ -194,6 +194,19 @@
"description": ""
},
"reloadExtension_title": {
"message": "Reload extension",
"description": ""
},
"reloadExtension_description": {
"message": "Perform a pending update.",
"description": ""
},
"reloadExtension_label": {
"message": "Reload",
"description": ""
},
"hideSetting": {
"message": "Click here to hide this setting.",
"description": ""

View File

@ -218,6 +218,9 @@
browser.runtime.reload();
}, 1000);
}
else {
settings.updatePending = true;
}
});
}
logging.message("end");

View File

@ -412,6 +412,11 @@
name: "disruptSessionOnUpdate",
defaultValue: false
},
{
name: "updatePending",
resetOnStartup: true,
defaultValue: false
},
{
name: "isStillDefault",
defaultValue: true

View File

@ -20,6 +20,9 @@
const mobile = require("../lib/mobile");
const callbacks = {
reloadExtension: function(){
browser.runtime.reload();
},
openNavigatorSettings: function(){
logging.verbose("open navigator settings");
window.open("navigator.html", "_blank");

View File

@ -19,6 +19,11 @@
{
"name": "disruptSessionOnUpdate"
},
{
"name": "reloadExtension",
"actions": ["reloadExtension",],
"displayDependencies": [{"updatePending": [true]}]
},
]
},
{

View File

@ -4,7 +4,7 @@ Version 1.6:
new features:
- try to not break tabs when updating
- setting to postpone updates until browser restart
- setting to postpone updates until browser restart or extension is reloaded
fixes:
- fix message canvasBlocker-unload

View File

@ -169,6 +169,14 @@
{
"version": "1.6Alpha20210118",
"update_link": "https://canvasblocker.kkapsner.de/versions/canvasblocker_beta-1.6Alpha20210118-an+fx.xpi"
},
{
"version": "1.6Alpha20210126",
"update_link": "https://canvasblocker.kkapsner.de/versions/canvasblocker_beta-1.6Alpha20210126-an+fx.xpi"
},
{
"version": "1.6Alpha20210127",
"update_link": "https://canvasblocker.kkapsner.de/versions/canvasblocker_beta-1.6Alpha20210127-an+fx.xpi"
}
]
}