-
-
Notifications
You must be signed in to change notification settings - Fork 1
Description
We've previously agreed that inline JS should be banned from scrapers (see kiwix/kiwix-js#789, kiwix/kiwix-js#865, and sister issues).
I've detected inline JS in the output of Vue.JS based scrapers (youtube and freecodecamp for now, more to come).
It however seems this inline JS is harmless in the tests I've made of one single freecodecamp ZIM on my very recent Chrome 137.
It might be that this inline JS is not strictly required to have a working page (some are linked to polyfills, probably not needed on my recent Chrome, but first one seems more "mandatory"). But I do not have any error message, so it is hard to tell.
Or is it that CSP have changed in recent Chromium? Or is there something "magic" in vite output which pleases the CSP?
I had a quick look at vite documentation (used to generate this index.html which contains inline JS) and it looks like there is no immediate solution to not generate this inline JS. One workaround might be to postprocess the index.html to move this JS to standalone files ... definitely doable, but I would prefer to not do this unless it is confirmed we have to.
@Jaifroid could you help me better understand this issue? I need help to at least confirm that I'm testing the ZIM in proper conditions to see the problem of inline JS ^^
@kelson42 would it be acceptable to keep this inline JS if we confirm it has no impact, or is it a NOGO from you because it could have too many other side effect.

