Quote:
Originally Posted by RbnJrg
The attached epub makes use of java scripts to achieve certain text effects with a minimum of html markup (all the work is made on the css stylesheet). The epub is perfectly displayed by the Calibre Book Editor, as you can see in the image below:
Attachment 189070
However, the Calibre book viewer only displays text without any formatting:
Attachment 189071
Obviously the Book Viewer is not loading the java scripts and I wonder why? I have included the keyword "defer" in the script tags but without result. It also doesn't work to move the scripts to the bottom of the page (above the body tag). I would like to know if all this is because I am doing something wrong, or because of a bug in the book viewer.
Regards
|
When I open your EPUB in Sigil, the formatting works in the preview screen. If I open your EPUB in the external PageEdit program, it doesn't work. If I open the EPUB on my old Galaxy J7 in the GitDen E-reader, it works.
The fact that JavaScript can work on an E-reader does not mean that all (combinations) of HTML, CSS and JavaScript code can also work in all E-readers and EPUB apps. In addition, for example, Google Play Books does not allow JavaScript and Javascript must be allowed on the E-reader.
I don't think the problem is the JavaScript not loading, but the EPUB render software version not being recognized.
To make your EPUB work properly in PageEdit I've put a webkit class over the HTML on both chapters to make it work:
Code:
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class=" -webkit-">
This modified version also works flawlessly in my GitDen app on the Galaxy J7.
Regards MicroDrie