Closed dylanbathurst closed 9 months ago
Nice start!
manifest.json
file to declare the extension? We want to use the latest manifest format (version 3)@Evanfeenstra thanks!
manifest.json
you can see it in the PR but it's in the public directory along with the popup.html template file. I put them there as they just get copied over to the top level of the dist
dir from vite. I can move it to the top level of the project, it'll just be more configs to copy it over in the vite.config file.window.postMessage
in order for the website to talk to our extension and other browser apis.A script should be injected into visited web pages, allowing communication between the service worker and the web page.
.. i did edit the issue like 15 minutes after it was created, maybe u didn't see that in time? It looks like using the Chrome offscreen
api is the way to go:https://stackoverflow.com/questions/66618136/persistent-service-worker-in-chrome-extension
I see, ok. I'll spend some time getting this implemented tonight.
I've added the background service worker and am posting messages from the content script. I'm still working on an issue where the messages aren't reaching the background script for some reason. I'll finish it up today.
@Evanfeenstra mind taking another look at this PR. I added the background script and also add examples of how to pass messages between the content/background/popup(Svelte) scripts.
Awesome, thanks @dylanbathurst !
See the README for a full description of features and getting started guide.