aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main_background.js20
1 files changed, 11 insertions, 9 deletions
diff --git a/main_background.js b/main_background.js
index 2b2a975..85cadaa 100644
--- a/main_background.js
+++ b/main_background.js
@@ -1064,15 +1064,17 @@ function edit_html(html,url,tabid,wl){
async function handle_html(response, whitelisted) {
let {text, request} = response;
let {url, tabId, type} = request;
- if (type === "main_frame") delete unused_data[tabId];
- browser.browserAction.setBadgeText({
- text: "✓",
- tabId
- });
- browser.browserAction.setBadgeBackgroundColor({
- color: "green",
- tabId
- });
+ if (type === "main_frame") {
+ delete unused_data[tabId];
+ browser.browserAction.setBadgeText({
+ text: "✓",
+ tabId
+ });
+ browser.browserAction.setBadgeBackgroundColor({
+ color: "green",
+ tabId
+ });
+ }
return await edit_html(text, url, tabId, whitelisted);
}