remind the user to restart the browser when disabling icon show
This commit is contained in:
parent
9ce1dfb6eb
commit
4f07cb5b5d
2 changed files with 20 additions and 4 deletions
|
@ -189,6 +189,13 @@
|
|||
"settings_filters_target": {
|
||||
"message": "Injection Target"
|
||||
},
|
||||
"settings_restartToApply": {
|
||||
"message": "Restart the extension or the browser to apply the changes."
|
||||
},
|
||||
"settings_restartToApply_iconChange": {
|
||||
"message": "The icon change doesn't happen automatically."
|
||||
},
|
||||
|
||||
"saving_current": {
|
||||
"message": "Saving…"
|
||||
},
|
||||
|
|
|
@ -86,10 +86,19 @@ class Page_Settings extends Page {
|
|||
});
|
||||
}
|
||||
|
||||
if (document.querySelector(`[data-action="storage,clear"]`)) {
|
||||
document
|
||||
.querySelector(`[data-action="storage,clear"]`)
|
||||
.addEventListener(`click`, async () => {
|
||||
// The extension icon cache doesn't clear by itself.
|
||||
(document.querySelector(`[data-store="settings,general,showApplicable"]`))
|
||||
? document.querySelectorAll(`[data-store="settings,general,showApplicable"]`).forEach((ELEMENT) => {
|
||||
ELEMENT.addEventListener(`change`, () => {
|
||||
!(ELEMENT.checked)
|
||||
? new logging(texts.localized(`settings_restartToApply`), texts.localized(`settings_restartToApply_iconChange`), true)
|
||||
: false;
|
||||
})
|
||||
})
|
||||
: false;
|
||||
|
||||
(document.querySelector(`[data-action="storage,clear"]`))
|
||||
? document.querySelector(`[data-action="storage,clear"]`).addEventListener(`click`, async () => {
|
||||
await global.forget(`sites`);
|
||||
console.log(await global.read(null, 1), await global.read(null, -1));
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue