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 #152

Merged
merged 6 commits into from
Dec 2, 2022
Merged

Remove inline Javascript #152

merged 6 commits into from
Dec 2, 2022

Conversation

pavel-karatsiuba
Copy link
Collaborator

@pavel-karatsiuba pavel-karatsiuba commented Nov 29, 2022

Javascript was moved from index.html to a separate file.

Fixes #134

@kelson42 kelson42 marked this pull request as ready for review November 29, 2022 19:29
@kelson42 kelson42 changed the title Issue 134 remove inline js Remove inline Javascript Nov 29, 2022
@pavel-karatsiuba pavel-karatsiuba linked an issue Nov 29, 2022 that may be closed by this pull request
@kelson42
Copy link
Contributor

@pavel-karatsiuba ready to review (if then, please put me in reviewer)? Otherwise please rewrite the history, no merge in the feature branch.

Copy link
Contributor

@kelson42 kelson42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems we still have inline javascript (it does not pass in Kiwix JS). I see at least:

<script id='ractive-template' type='text/html'>

on home page

@pavel-karatsiuba
Copy link
Collaborator Author

It seems we still have inline javascript (it does not pass in Kiwix JS). I see at least:

<script id='ractive-template' type='text/html'>

on home page

This script was not dangerous for CSP. But I also moved it to a separated file.

Base automatically changed from issue-148-not-generating-zim to master December 1, 2022 18:56
@kelson42
Copy link
Contributor

kelson42 commented Dec 1, 2022

@Jaifroid We have removed all the inline JS, but this still does not load properly in Kiwix-JS. See https://www.dropbox.com/s/alfulridglnsxkv/phet_fr_2022-12.zim?dl=0. Another problem?

@kelson42
Copy link
Contributor

kelson42 commented Dec 2, 2022

@Jaifroid Actually it seems that my test was wrong (was testing with JQuery). Works fine. I will merge the PR and let me know if any other problem.

@kelson42 kelson42 merged commit ebd6116 into master Dec 2, 2022
@kelson42 kelson42 deleted the issue-134-remove-inline-js branch December 2, 2022 12:59
@Jaifroid
Copy link

Jaifroid commented Dec 2, 2022

Thank you, this helps with kiwix/kiwix-js#865.

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

Successfully merging this pull request may close these issues.

Remove inline javascript to comply with some CSP
3 participants