Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader > Kobo Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 01-11-2016, 09:40 AM   #1
zobo
Junior Member
zobo began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Dec 2015
Device: h2o
Javascript and local .html files

Greetings!

I'm using an "out-of-the-box" Kobo Aura H20.
I'm hoping to use it as a one-stop reference tool - the ability to read pdfs, access tiffs, use a browser in the rain, etc is very handy and not economically available in other hardware.
BUT...
I wanted a scientific calculator. I knocked one up in Javascript, and although it works well enough when I use the Kobo browser to access the calculator "on-line" on a remote server, the javascript is not active when I load the calculator.html file into the Library and view it. The buttons show, but do nothing. Some experimentation showed it's not my bad js, but that the reader ignores js.
Q1) Is there a way to make the reader parse and act on js code?

I tried to use the browser to walk the local directory tree by entering

file:///

in the address bar - but that fails to load anything.

Q2) Can the kobo browser access local files?
Q2a) If so, how, and what syntax?

Thanks for your time...

zobo
zobo is offline   Reply With Quote
Old 01-11-2016, 10:52 AM   #2
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
I know the Kindle browser does not make local files available at all (security) and I assume Kobo does the same.

We (Kindle dev corner) got around that with alternative hacked browsers, but I don't believe anyone has done that on the Kobo.



I suggest you run a local webserver, e.g. via Kobo WebPortal / Notes / ServiceMenu
eschwartz is offline   Reply With Quote
Advert
Old 01-11-2016, 05:26 PM   #3
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by zobo View Post
Greetings!

I'm using an "out-of-the-box" Kobo Aura H20.
I'm hoping to use it as a one-stop reference tool - the ability to read pdfs, access tiffs, use a browser in the rain, etc is very handy and not economically available in other hardware.
BUT...
I wanted a scientific calculator. I knocked one up in Javascript, and although it works well enough when I use the Kobo browser to access the calculator "on-line" on a remote server, the javascript is not active when I load the calculator.html file into the Library and view it. The buttons show, but do nothing. Some experimentation showed it's not my bad js, but that the reader ignores js.
Q1) Is there a way to make the reader parse and act on js code?
That is to be expected as the Javascript is not supported in ePub2.
Quote:
I tried to use the browser to walk the local directory tree by entering

file:///

in the address bar - but that fails to load anything.

Q2) Can the kobo browser access local files?
Q2a) If so, how, and what syntax?
The root of the accessible local file system should be: /mnt/onboard. I have not idea whether the browser can acces these, but I would expect it can.
davidfor is offline   Reply With Quote
Old 01-21-2016, 11:23 AM   #4
zobo
Junior Member
zobo began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Dec 2015
Device: h2o
davidfor suggested:

"The root of the accessible local file system should be: /mnt/onboard. I have not idea whether the browser can acces these, but I would expect it can. "

Just in case others stumble this way ... the browser is unable to access the local file system with a "file:///" prefaced URL.

Looks like the idea is not going anywhere unless one has access to a server (including one installed locally). A pity - one can do a lot with JScript.
zobo is offline   Reply With Quote
Old 01-21-2016, 11:47 AM   #5
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Quote:
Originally Posted by zobo View Post
davidfor suggested:

"The root of the accessible local file system should be: /mnt/onboard. I have not idea whether the browser can acces these, but I would expect it can. "

Just in case others stumble this way ... the browser is unable to access the local file system with a "file:///" prefaced URL.
As I thought.

Quote:
Looks like the idea is not going anywhere unless one has access to a server (including one installed locally). A pity - one can do a lot with JScript.
Did you try frostschutz's "Kobo WebPortal"?
eschwartz is offline   Reply With Quote
Advert
Old 06-24-2016, 01:48 PM   #6
pipcat
Connoisseur
pipcat ought to be getting tired of karma fortunes by now.pipcat ought to be getting tired of karma fortunes by now.pipcat ought to be getting tired of karma fortunes by now.pipcat ought to be getting tired of karma fortunes by now.pipcat ought to be getting tired of karma fortunes by now.pipcat ought to be getting tired of karma fortunes by now.pipcat ought to be getting tired of karma fortunes by now.pipcat ought to be getting tired of karma fortunes by now.pipcat ought to be getting tired of karma fortunes by now.pipcat ought to be getting tired of karma fortunes by now.pipcat ought to be getting tired of karma fortunes by now.
 
Posts: 65
Karma: 200153
Join Date: Apr 2016
Device: Kobo Glo Hd
Quote:
Originally Posted by zobo View Post
Just in case others stumble this way ... the browser is unable to access the local file system with a "file:///" prefaced URL.
The browser is unable to browse local files but is able to open local files. I used it to view logs of autopatch, for example.
Ok: file:///mnt/onboard/.khd-autopatch/logs/2016-06-22.log
Not ok: file:///mnt/onboard/.khd-autopatch/logs/

It's useful when we have some script that puts info in plain text because we can see it from Kobo device without connecting to a computer ;-)
pipcat is offline   Reply With Quote
Reply

Tags
browser, html, javascript


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Glo HTML/javascript ? nicopilami Kobo Developer's Corner 1 09-12-2015 01:33 PM
Kobo Touch HTML/JavaScript support? dgatwood Kobo Reader 8 01-31-2012 09:25 PM
PRS-950 Can PRS-950 web browser view local HTML files? roc Sony Reader 3 04-02-2011 10:58 AM
Browser doesn't load local HTML files? kenjennings enTourage Archive 1 02-19-2011 09:52 AM
Access to local HTML files and content, HTML ebooks, annotation on HTML ebooks leo315 enTourage Archive 2 05-10-2010 02:40 PM


All times are GMT -4. The time now is 03:01 PM.


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