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

Remove inline javascript to comply with some CSP #154

Closed
mossroy opened this issue Mar 4, 2022 · 6 comments
Closed

Remove inline javascript to comply with some CSP #154

mossroy opened this issue Mar 4, 2022 · 6 comments
Assignees
Labels
Milestone

Comments

@mossroy
Copy link

mossroy commented Mar 4, 2022

Tested with dirtybiology_fr_all_2021-10.zim, dirtybiology_fr_all_2015-11.zim, and litterature-audiobooks-poetry_fr_2020-01.zim

Every page has the following inline script, that could be moved to a javascript file:

<script>$(document).ready(function() { trigger_webp_polyfill(); });</script>

And the drop-down list of the home page does not work because of its onchange attribute, that could be replaced by attaching an event handler on it (in a javascript file):

<select class="chosen-select" name="list" onchange="genplaylist()">...</select>

@stale
Copy link

stale bot commented Jun 13, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be now be reviewed manually. Thank you for your contributions.

@rgaudin
Copy link
Member

rgaudin commented Jul 29, 2022

Fixed via 5d468e3. Tested OK with Kiwix JS 3.4.0 extension in Chrome; which failed without the fix.

@rgaudin rgaudin closed this as completed Jul 29, 2022
@kelson42 kelson42 added this to the 2.2.0 milestone Jul 30, 2022
@mossroy
Copy link
Author

mossroy commented Jul 30, 2022

Thanks!
Could you give us a link to a newly-generated ZIM file (when one is available)?

@rgaudin
Copy link
Member

rgaudin commented Aug 1, 2022

A new biologie-tout-compris_fr_all is scheduled but in the mean time, here's the test one I created test_yt5_2022-07.zim (16MB)

@rgaudin
Copy link
Member

rgaudin commented Aug 1, 2022

@mossroy
Copy link
Author

mossroy commented Aug 3, 2022

It seems to work fine, thanks!

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

No branches or pull requests

3 participants