Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 11-11-2016, 10:54 AM   #31
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,727
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by fbrzvnrnd View Post
This because some ebook readers (Lekt on Android and Azardi) give error when meet navigator.epubReadingSystem.name and stop the jevascript code.
I only have rudimentary JavaScript skills but checking navigator.hasOwnProperty should allow you to find out whether an epub3 app supports epubReadingSystem. (Apps that don't support epubReadingSystem usually only have minimal epub3 support.)

For a ready-made example, see this very simple epub3 test file, which uses the following code:

Code:
  function showinfo() {
      if (navigator && navigator.hasOwnProperty('epubReadingSystem')) {
          var versionInfo = "name: " + navigator.epubReadingSystem.name + " " + navigator.epubReadingSystem.version + "\nplatform: " + navigator.platform + "\nlayoutStyle: " + navigator.epubReadingSystem.layoutStyle + "\n";
          var features = ["dom-manipulation", "layout-changes", "touch-events", "mouse-events", "keyboard-events", "spine-scripting"];
          var featureLog = "";
          for (var i = 0; i < 6; i++) {
              if (navigator.epubReadingSystem.hasFeature(features[i])) {
                  featureLog += features[i] + ": supported\n";
              } else {
                  featureLog += features[i] + ": NOT supported\n";
              }
          }
          alert(versionInfo + featureLog);
      } else {
          alert('epubReadingSystem object not found.' + "\nappName: " + navigator.appName + "\nappVersion: " + navigator.appVersion + "\nplatform: " + navigator.platform);
      }
  }
It'll return Netscape as the navigator.appName value for Sigil, Azardi and Lektz. IMHO, Gitden Reader is usually better at rendering epub3 books than Lektz.

Last edited by Doitsu; 11-11-2016 at 11:03 AM.
Doitsu is offline   Reply With Quote
Old 11-11-2016, 11:53 AM   #32
fbrzvnrnd
Fanatic
fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.
 
Posts: 557
Karma: 400004
Join Date: Feb 2009
Device: ONYX M96
Yes, your code is cleaner, I used "try" because I was trying to understand why the EPUB3 was not working. Actually I use Lektz because in Gitden reader is impossibile to "turn off" the left and right places that turn the page, so in my interactive ebook everytime someone is touching the lirics in left or right border of the page, Gitden turn the page...
fbrzvnrnd is offline   Reply With Quote
Advert
Old 02-03-2017, 04:39 AM   #33
fbrzvnrnd
Fanatic
fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.
 
Posts: 557
Karma: 400004
Join Date: Feb 2009
Device: ONYX M96
btw: the EPUB3 is ready:

http://www.quintadicopertina.com/ind...orie&Itemid=63

If someone here helped and want to see the ebook send me a message, so I can send a free copy (it is in italian language anyway)

Have a nice day


Fabrizio
fbrzvnrnd is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
EPUB3 and svg files roger64 ePub 20 07-12-2022 01:19 PM
ePub3: localStorage/JavaScript/RTL support Doitsu ePub 7 06-02-2015 06:55 AM
Is there any android epub reader supporting epub3 with audio/video/javascript? happycoding Android Developer's Corner 10 07-29-2014 11:16 AM
Create a javascript quizz for Epub3 in Sigil BertrandThibaut Sigil 3 01-26-2014 09:04 AM
JAVASCRIPT support in ePub2/ePub3 Raja1205 ePub 7 09-03-2012 06:48 AM


All times are GMT -4. The time now is 03:35 AM.


MobileRead.com is a privately owned, operated and funded community.