aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.lisp
diff options
context:
space:
mode:
authorTeddy Wing2023-11-11 00:02:23 +0100
committerTeddy Wing2023-11-11 00:02:23 +0100
commit3ddadb8f214c7a42c15a1bb7b9486a5a97760136 (patch)
tree19e3fb563f5beda538efc0bd482c61fec6aeae6c /src/main.lisp
parentb0ebff227e83dff5df8be847d2f2a5cc33410368 (diff)
downloadextreload-3ddadb8f214c7a42c15a1bb7b9486a5a97760136.tar.bz2
main: Ideas for reload in Manifest V3
I looked into fixing the tab reload in Manifest V3, but haven't figured out a way to get it working yet. Apparently according to the file stat, I did this on 2023-02-13.
Diffstat (limited to 'src/main.lisp')
-rw-r--r--src/main.lisp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main.lisp b/src/main.lisp
index 198b3ab..ad47ef0 100644
--- a/src/main.lisp
+++ b/src/main.lisp
@@ -69,7 +69,7 @@
(attach-extensions targets extension-ids)))
- (if (target-attached-to-target-msg-p response)
+ (when (target-attached-to-target-msg-p response)
(reload-extension (json-obj-get
(json-obj-get response "params")
"sessionId")))
@@ -146,7 +146,7 @@ the target to reload the current tab."
(runtime-evaluate-msg
(next-call-id *devtools-secondary-call-id*)
session-id
- "chrome.tabs.reload()")))
+ "chrome.tabs.reload(() => {})")))
(defun extension-targets (targets)
"Filter `targets`, returning a list of targets corresponding to extensions."
@@ -154,6 +154,8 @@ the target to reload the current tab."
(or
(string= (json-obj-get target "type")
"background_page")
+ ;; TODO: This might require us to re-attach to the service worker after chrome.runtime.reload
+ ;; Compare MV2 and MV3 debug output
(string= (json-obj-get target "type")
"service_worker"))))