Skip to content

Commit 33b9d38

Browse files
chore: remove console.debug from production code
Removed console.debug statements across the codebase to improve maintainability and readability. Some logs were replaced with descriptive comments in catch blocks to preserve context without polluting the console in production. Co-authored-by: cmuench <211294+cmuench@users.noreply.github.com>
1 parent 5bedaee commit 33b9d38

3 files changed

Lines changed: 4 additions & 6 deletions

File tree

content-scripts/selector-capture.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
webhooks[index] = { ...webhooks[index], selectors };
4040
await browserAPI.storage.sync.set({ webhooks });
4141
} catch (error) {
42-
console.debug("Failed to persist selector locally", error);
42+
// Failed to persist selector locally
4343
}
4444
};
4545

@@ -49,12 +49,11 @@
4949
const result = browserAPI.runtime.sendMessage(message);
5050
if (result && typeof result.then === "function" && typeof result.catch === "function") {
5151
result.catch((error) => {
52-
console.debug("Runtime message rejected", error);
52+
// Runtime message rejected
5353
});
5454
}
5555
} catch (error) {
5656
// Ignore messaging errors when popup/background is unavailable
57-
console.debug("Failed to send runtime message", error);
5857
}
5958
};
6059

popup/popup.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ document.addEventListener("DOMContentLoaded", async () => {
9797
return true;
9898
}
9999
} catch (error) {
100-
console.debug("Failed to inject selector capture script", error);
100+
// Failed to inject selector capture script
101101
}
102102
return false;
103103
};
@@ -406,7 +406,6 @@ document.addEventListener("DOMContentLoaded", async () => {
406406
await attemptStart();
407407
return;
408408
} catch (retryError) {
409-
console.debug("Selector capture retry failed", retryError);
410409
lastError = retryError;
411410
}
412411
}

utils/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ async function sendWebhook(webhook, isTest = false) {
171171
selectors = storedMatch.selectors.filter((value) => typeof value === "string" && value.trim().length > 0);
172172
}
173173
} catch (error) {
174-
console.debug("Failed to load stored selectors", error);
174+
// Failed to load stored selectors
175175
}
176176
}
177177

0 commit comments

Comments
 (0)