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

Fix scrapers to remove inline javascript in ZIM files #865

Closed
11 tasks done
mossroy opened this issue Jun 2, 2022 · 11 comments
Closed
11 tasks done

Fix scrapers to remove inline javascript in ZIM files #865

mossroy opened this issue Jun 2, 2022 · 11 comments
Milestone

Comments

@mossroy
Copy link
Contributor

mossroy commented Jun 2, 2022

As discussed in #789, browser extensions now enforce some CSP that block inline javascript.
And it might happen in some other contexts, too.

Here is a list of affected scrapers that should be fixed (most critical first):

NB: please tick the items in the list only when it has been tested with Kiwix-js with a public ZIM file

@mossroy mossroy added this to the v3.5 milestone Jun 2, 2022
@mossroy mossroy changed the title Remove inline javascript in ZIM files Remove inline javascript in ZIM scrapers Jun 2, 2022
@mossroy mossroy changed the title Remove inline javascript in ZIM scrapers Fix scrapers to remove inline javascript in ZIM files Jun 2, 2022
@mossroy mossroy modified the milestones: v3.5, v3.6 Aug 4, 2022
@Jaifroid Jaifroid modified the milestones: v3.6, v3.7 Nov 9, 2022
@Jaifroid Jaifroid modified the milestones: v3.7, v3.8 Jan 3, 2023
@Jaifroid Jaifroid modified the milestones: v3.8, v3.9 Apr 22, 2023
@Jaifroid
Copy link
Member

It looks like we might have got as far as we can with this issue. It has become less critical now that we are forced (due to Manifest V3) to use the PWA workaround for the Chromium extension. However, "conceptually" it would be nice to fix the remaining three scrapers. @kelson42 Do you think this issue should now be closed (but leave the unresolved three issues listed above still open)?

@kelson42
Copy link
Collaborator

Still something to finish, now officially on the plate of @benoit74 ;)

@benoit74
Copy link

kolibri is now done with openzim/kolibri#43, will probably be released very soon with openzim/kolibri#44, please tick the box (I don't have sufficient rights ;o))

@Jaifroid
Copy link
Member

@benoit74 Wonderful, many thanks! Box duly ticked!

@benoit74
Copy link

@Jaifroid : I forgot to mention it, you can tick openedx as well

As discussed with @kelson42, gutenberg is on my plate, I plan to do this in August / early September together will all remaining issues of 2.1.0

@Jaifroid
Copy link
Member

Thank you very much, @benoit74. I've ticked OpenEdx and look forward to Gutenberg in due course!

@benoit74
Copy link

@Jaifroid: Could you please test:

Unfortunately I cannot provide a ZIM to test openedx because we have no more active recipes on Zimfarm + other issues preventing the scraper to operate properly on recent openedx versions (openzim/openedx#175)

@kelson42
Copy link
Collaborator

@benoit74 Thank you very to have fixed the last scrapers. I can't wait to see that ticket closed!

@Jaifroid
Copy link
Member

@benoit74 Thank you very much indeed. I've tested the new Gutenberg ZIM in the Chromium extension in the "Service Worker Local" mode, and I can confirm that books now display and load correctly, and all JS seems to be functioning as expected.

I'm still downloading the African Story Book, so will report back on that, but it's looking great!

@Jaifroid
Copy link
Member

I've now tested the African Story Book ZIM in Chromium with Service Worker Local mode (this is the mode where inline JS is blocked), and I confirm that it all looks good. The EPUB viewer, which I think is the main piece of dynamic code here, works perfectly with this version.

@benoit74 Many thanks indeed. So I think we can finally close this issue if everyone is happy. 😊

@Jaifroid
Copy link
Member

Thanks once again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants