Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader

Notices

Reply
 
Thread Tools Search this Thread
Old 10-16-2012, 09:49 AM   #1
rtmyers
Member
rtmyers began at the beginning.
 
Posts: 24
Karma: 10
Join Date: Aug 2012
Device: iPad
No external JS?

I'm developing books with embedded JS and trying to get them to work on the Kobo Touch. I'll be darned if it doesn't completely ignore external JavaScript (<script src="...">), while the same JS pasted directly on the page works just fine. Or maybe I'm missing something...anyone?

Now I just have to figure out how to detect touch events and stop them from propagating--the same code that does all that just fine on iBooks appears to do nothing at all on the Touch.
rtmyers is offline   Reply With Quote
Old 10-16-2012, 12:50 PM   #2
ottdmk
Wizard
ottdmk ought to be getting tired of karma fortunes by now.ottdmk ought to be getting tired of karma fortunes by now.ottdmk ought to be getting tired of karma fortunes by now.ottdmk ought to be getting tired of karma fortunes by now.ottdmk ought to be getting tired of karma fortunes by now.ottdmk ought to be getting tired of karma fortunes by now.ottdmk ought to be getting tired of karma fortunes by now.ottdmk ought to be getting tired of karma fortunes by now.ottdmk ought to be getting tired of karma fortunes by now.ottdmk ought to be getting tired of karma fortunes by now.ottdmk ought to be getting tired of karma fortunes by now.
 
Posts: 1,217
Karma: 3804496
Join Date: Feb 2012
Location: Ottawa, Ontario, Canada
Device: Kobo Libra 2, Lenovo Tab M10 FHD Plus, Lenovo Tab M9
You should check out the developer's forum: https://www.mobileread.com/forums/forumdisplay.php?f=247
ottdmk is offline   Reply With Quote
Old 10-16-2012, 12:53 PM   #3
rtmyers
Member
rtmyers began at the beginning.
 
Posts: 24
Karma: 10
Join Date: Aug 2012
Device: iPad
Thanks, I did take a look at the Developer's forum, but it seemed to more about hacking and programming the device, whereas I am trying to build smart books to read on it...
rtmyers is offline   Reply With Quote
Old 10-16-2012, 02:35 PM   #4
rtmyers
Member
rtmyers began at the beginning.
 
Posts: 24
Karma: 10
Join Date: Aug 2012
Device: iPad
Now I am trying to handle touch events from Javascript within books to be read on the Kobo Touch. I put a simple handler on the body element:

Code:
<body ontouchstart="alert('touched')">
but this event is never triggered when I touch the page. Any thoughts?

I tried querying navigator.epubReadingSystem.hasFeature("touch-events") (see http://code.google.com/p/epub-revisi...bReadingSystem), but it turns out navigator.epubReadingSystem is not defined on the Kobo Touch, even though the "spec" says
Returns an object that represents the current reading system. Every reading system that supports scripting in any fashion MUST provide this object.
rtmyers is offline   Reply With Quote
Old 10-16-2012, 05:03 PM   #5
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
Posts: 13,297
Karma: 78876004
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
Quote:
Originally Posted by rtmyers View Post
Returns an object that represents the current reading system. Every reading system that supports scripting in any fashion MUST provide this object.
That might well be the clue.... Every reading system that supports scripting in any fashion MUST provide this object

So no support for scripting would mean NO need to provide the object
PeterT is offline   Reply With Quote
Old 10-16-2012, 09:38 PM   #6
Xennex1170
Addict
Xennex1170 ought to be getting tired of karma fortunes by now.Xennex1170 ought to be getting tired of karma fortunes by now.Xennex1170 ought to be getting tired of karma fortunes by now.Xennex1170 ought to be getting tired of karma fortunes by now.Xennex1170 ought to be getting tired of karma fortunes by now.Xennex1170 ought to be getting tired of karma fortunes by now.Xennex1170 ought to be getting tired of karma fortunes by now.Xennex1170 ought to be getting tired of karma fortunes by now.Xennex1170 ought to be getting tired of karma fortunes by now.Xennex1170 ought to be getting tired of karma fortunes by now.Xennex1170 ought to be getting tired of karma fortunes by now.
 
Posts: 355
Karma: 289856
Join Date: Oct 2011
Location: Honolulu, Hawaii
Device: Kobo Touch
Quote:
Originally Posted by PeterT View Post
That might well be the clue.... Every reading system that supports scripting in any fashion MUST provide this object

So no support for scripting would mean NO need to provide the object
I'm actually curious now.. Would such ebooks still be compatible with current epub ereaders out now? Or would it only really be supported in 'higher-end' devices like smartphones and tablets?

Is scripting an allowed option of the epub format? Would it still be an .epub file in other words.
Xennex1170 is offline   Reply With Quote
Old 10-16-2012, 10:27 PM   #7
rtmyers
Member
rtmyers began at the beginning.
 
Posts: 24
Karma: 10
Join Date: Aug 2012
Device: iPad
No, the Kobo Touch does support scripting. It just doesn't, as far as I can tell, support scripts in external files.

Quote:
Originally Posted by Xennex1170 View Post
I'm actually curious now.. Would such ebooks still be compatible with current epub ereaders out now? Or would it only really be supported in 'higher-end' devices like smartphones and tablets?

Is scripting an allowed option of the epub format? Would it still be an .epub file in other words.
To be precise, scripted ebooks are compatible with whatever devices offer scripting support , which include some but not all readers advertising themselves as supporting epub3, including iBooks, Readium, VitalSource Reader, Calibre if you call that a reader, etc. Whether or not it's supported on a smartphone or tablet is not a question of whether it's a "higher-end" device, but whether the particular reader you're using on that device supports it.

Scripting is an optional feature of epub3 implementations. Books using scripting are very much still epubs.
rtmyers is offline   Reply With Quote
Old 10-16-2012, 11:24 PM   #8
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
Posts: 13,297
Karma: 78876004
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
It might support scripting within Kobo format ePubs (kEpubs) but I seriously doubt it supports them within ePubs (ePubs).

You can to a limited way force the Kobo to open a book in the Kobo format engine but this is not supported (and frowned on) by Kobo.
PeterT is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Color Use of external keyboard notaguru Nook Color & Nook Tablet 0 04-19-2012 01:35 PM
External SD 0bserver92 Kobo Tablets 4 03-17-2012 11:17 AM
External Speaker Senior Kobo Tablets 3 01-09-2012 02:05 PM
Accessories External Speaker Hopi enTourage Archive 8 03-06-2011 12:41 AM
Is it possible to an external font to be used? Semp Kobo Reader 1 05-03-2010 12:44 PM


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


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