You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: