aboutsummaryrefslogtreecommitdiffstats
path: root/extension
diff options
context:
space:
mode:
authorOmar Rizwan <omar@omar.website>2020-12-31 18:00:25 -0800
committerOmar Rizwan <omar@omar.website>2020-12-31 18:00:25 -0800
commitd588283fb2e0a8cafef5b19b0a859d9bc02aee54 (patch)
tree00b2869818ad2e3486b89c6c9be1c3e611f25c74 /extension
parent86cf0a0ae87e6d1981bded138e8712badf28c17b (diff)
Firefox fixes, md update
Diffstat (limited to 'extension')
-rw-r--r--extension/background.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/extension/background.js b/extension/background.js
index a78a7fd..1b1cad0 100644
--- a/extension/background.js
+++ b/extension/background.js
@@ -54,7 +54,7 @@ async function detachDebugger(tabId) {
}
const TabManager = (function() {
if (TESTING) return;
- chrome.debugger.onEvent.addListener((source, method, params) => {
+ if (chrome.debugger) chrome.debugger.onEvent.addListener((source, method, params) => {
console.log(source, method, params);
if (method === "Page.frameStartedLoading") {
// we're gonna assume we're always plugged into both Page and Debugger.
@@ -347,6 +347,7 @@ router["/tabs/by-id/*/control"] = {
// debugger/ : debugger-API-dependent (Chrome-only)
(function() {
+ if (!chrome.debugger) return;
// possible idea: console (using Log API instead of monkey-patching)
// resources/
// TODO: scripts/ TODO: allow creation, eval immediately