-
-
Notifications
You must be signed in to change notification settings - Fork 148
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
PhET zim not read on Kiwix-JS #339
Comments
This is a known issue. Kiwix-js does not currently inject the javascript files at all. |
Ok thanks - I'd seen #152 but wasn't entirely sure it was the same problem. |
To be honest, I'm not 100% sure either. But I don't see how these PhET experiments would work without a bunch of javascript code, so I did not investigate more. |
Javascript is now enabled in ServiceWorker mode. PhET seems to work properly in this mode. |
@mossroy I have tried with last nightly and https://download.kiwix.org/zim/phet/phet_fr_2018-11.zim. The welcome page is empty = not displayed properly to me. I'm in Jquery mode as service worker does not work out-of-the-box on FF. |
@kelson42 In master, only SW mode currently supports PhET. I have an experimental branch, JavaScript Support that include JS support in jQuery mode. However, the front page of PhET is not currently working in that branch in jQuery mode. If you press the random button in that branch, you'll see that a random experiment will load and is usable. But I need to debug the landing page. It's probably because it uses ReactJS (I think), and that involves a lot of inline JavaScript, which my branch tries to put into attached scripts so that a page will work with a restrictive CSP. I may have to ditch that workaround. |
@kelson42 : try on Chromium/Chrome with a recent nightly of kiwix-js Chrome extension, and choose the ServiceWorker mode. Firefox still blocks ServiceWorkers in extensions, even if they plan to enable it in the future. |
In ServiceWorker mode, the latest gutenberg seems to work well too, and also various ZIMs that have videos (tedx, oer4schools, dirtybiology etc, even if moving to a specific time in the video does not work on all browsers) |
I can get the PhET UI to show up in jQuery mode in my JS support branch if: a) I disable the code that searches for However, it is still not possible (yet) to launch titles from this UI because we would need to patch the JavaScript that references the ZIM url, so that it launches the extraction engine. This looks pretty difficult to do. However, if we can get our standard search to work correctly in these ZIMs (#440), it would mitigate this problem. |
PhET is now supported in Service Worker mode, and a banner is thrown up in jQuery mode asking the user to switch (and showing how). I do have an experimental branch that injects JS in jQuery mode, and it can run PhET experiments, but it can't run the React-based UI. In any case, this issue is a specific case of #152 , and that issue would be the place to solve it if it's worthwhile merging my version that enables injection of JavaScript from the ZIM. So I'm closing this (though feel free to re-open if it needs further discussion here). |
I basically get the splash screen and that's it - no way to access content (either Kiwix JS windows or browser extension). See image:
The text was updated successfully, but these errors were encountered: