Closed sansmoraxz closed 1 year ago
Refer #334
Nice work. I tried this out locally. When I disabled network access and refresh the page nothing loads. Is this intended behaviour?
Really cool to have more contributors to the project, however it be nice if you explained a bit more what and why you're doing certain things in your PR.
We've added comments to those sections where we're unsure what you're doing. (and I've also added a few suggestions regarding readability and code cleanliness)
(If this is a WIP and you were planning on fleshing this out more, might wanna consider making that clear in the body of the PR.)
Here's a patch to maintain compatibility with firefox for the time being.
Basically, build with no service worker.
Otherwise, it's OK to merge this. Didn't observer any other bugs in my system.
Quick update. This is looking good - hope to merge it soon. The project is currently in testing gearing up for the next big release (Internationalisation support). Releasing multiple big features in a single update to Chrome and Firefox stores is difficult and will be avoided going forward.
Then this may be put on hold for the time being. Unless we implement something like what was done here, it may make sense to wait for Firefox to officially support manifest v3.
I was overthinking it. We don't nescessarily need to use manifest v3. Native injection with plain js just works.
For firefox extensions can't use sw, but for any other url it works.
Anyway I scrapped all the old changes, and making fresh pr just for the service worker.
Cleaner this way.
Service workers should work for most chrome based browsers. Although I admit I didn't test extensively other than chrome and edge.
For firefox service worker wouldn't load when installed as extension though.
But yeah I think this is ready to be merged now.
Closing this as it was related to code that's no longer used, and I will probably use this branch as active development.
Gonna send a fresh pr from a different branch.
Service worker
sw.js
Injector code to register service worker when running natively (non extension)webv
action to deploy on web (non extension mode)