call for analysis if autorunning disabled

This commit is contained in:
buzz-lightsnack-2007 2024-05-06 14:18:10 +08:00
parent 95c80173db
commit 04bf5e2ba7

View file

@ -11,6 +11,7 @@ class IconIndicator {
*/
static enable() {
BrowserIcon.enable();
BrowserIcon.addActionListener("onClicked", () => {BrowserIcon.onclick();});
// Enable icon changes if enabled within the settings.
(Tabs.query(null, 0)).then((TAB) => {
@ -69,6 +70,7 @@ class IconIndicator {
*/
static disable() {
BrowserIcon.disable();
BrowserIcon.removeActionListener("onClicked", () => {BrowserIcon.onclick();});
// Enable icon changes if enabled within the settings.
global.read([`settings`, `general`, `showApplicable`]).then((PREFERENCE) => {
@ -83,15 +85,6 @@ class IconIndicator {
})
}
/*
Set the function.
@param {function} callback the function to run.
*/
static set(callback) {
BrowserIcon.addActionListener("onClicked", callback);
}
/*
The action when the icon is clicked.
*/