From 3ddadb8f214c7a42c15a1bb7b9486a5a97760136 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sat, 11 Nov 2023 00:02:23 +0100 Subject: 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. --- src/main.lisp | 6 ++++-- 1 file 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")))) -- cgit v1.2.3