Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pages analysed in content.js and not background.js #7

Open
0xturboblitz opened this issue Apr 6, 2022 · 0 comments
Open

Pages analysed in content.js and not background.js #7

0xturboblitz opened this issue Apr 6, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@0xturboblitz
Copy link
Collaborator

Since manifest v3, background scripts of chrome extensions must be service workers.

I was unable to use nsfwjs in the service worker due to the inability of service workers to manipulate DOM content.

Thus, the model is loaded in content.js for each page, which is inefficient. Fortunately, the model is cached by chrome, which makes it not so slow after all.

This issue does not seem to have been resolved yet by nsfw-filter either.

In any case, it seems like the duration of chrome extension service worker is limited to ~5mins, so the model would still have to be reloaded every 5 mins during surfing.

If anyone has faced a similar issue or has an idea, do not hesitate to do a PR or contact us.

@0xturboblitz 0xturboblitz added the enhancement New feature or request label Apr 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant