![]() |
#1 | |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Aug 2025
Device: Kobo Libra 2
|
kepub - running Javascript
Hi all,
I want to run the following script in my page, but it crashes because kobo sees the "<" sign as the start of a tag (i think) Quote:
it does work on an ereader in my browser |
|
![]() |
![]() |
![]() |
#2 |
Member
![]() Posts: 18
Karma: 10
Join Date: Oct 2024
Device: Kobo Libra Colour
|
"Kobo’s eInk and Desktop platforms have limited support for JavaScript, and do not support interactive JavaScript elements." (https://github.com/kobolabs/epub-spe...script-support)
I think what you are trying to do is simply not supported, especially if you call updateTimeText using an interactive element. |
![]() |
![]() |
![]() |
#3 | |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Aug 2025
Device: Kobo Libra 2
|
I am not calling the function using an interactive element, but am calling it later in the script. I did the same with the following function, and that one works:
Quote:
|
|
![]() |
![]() |
![]() |
#4 | |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Aug 2025
Device: Kobo Libra 2
|
I have it working, right now it does use the
//<![CDATA[ tags and I splice the date instead of the getHours(). I also do not use toLocaleTimeString. Besides this I simplified some other stuff and took out some other function. It's almost like the epub has a timeout when stuff takes too long. But I'm happy this works and I hope this helps anyone: Quote:
this shows a different greeting based on the system time of the ereader |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Javascript | serrafa | Sigil | 2 | 12-22-2023 09:02 AM |
Running calibre.exe --shutdown-running-calibre does *NOT* terminate the E-book Viewer | MReader67 | Calibre | 4 | 06-12-2023 01:53 PM |
How to get Calibre 3 running on Raspberry Pi 3 running Raspbian Jessie? | fivestones | Calibre | 6 | 01-25-2018 09:41 PM |
Creating epub/kepub books (docx→epub/kepub via MS Word→Calibre) | SJC-Caron | ePub | 18 | 04-21-2016 11:10 AM |
Is there a way to import kepub to calibre/convert a kepub to other formats? | Major General | Library Management | 9 | 04-08-2014 10:00 PM |