diff --git a/scripts/GUI/entrypoints/iconindicator.js b/scripts/GUI/entrypoints/iconindicator.js index 1f1e419..f5b4a79 100644 --- a/scripts/GUI/entrypoints/iconindicator.js +++ b/scripts/GUI/entrypoints/iconindicator.js @@ -10,7 +10,8 @@ class IconIndicator { Indicate that the website is supported through icon change. */ static enable() { - BrowserIcon.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) => { @@ -82,15 +84,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.