Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 04-16-2010, 06:55 PM   #1
pollito pito
i warned you ...
pollito pito doesn't litterpollito pito doesn't litterpollito pito doesn't litter
 
pollito pito's Avatar
 
Posts: 54
Karma: 222
Join Date: Apr 2010
Device: none
Two columns display in the viewer? (facing pages)

I am still trying to convince the viewer that I want it to show two facing pages.
(old me likes reading in wide screen).
I’ve playing a lot with custom CSS without much of a success. Now, in some
old thread it was mentioned that the reader supports jQuery. If it is true, that
may open a lot of possibilities. However, I could not find any documentation
explaining how.
If someone could put me in the proper track…

1-Does the reader really supports jQuery?
2-Will it also support jQuery plugins?
3-Where do I put my jscript and eventually the plugins?
4-Can someone provide an example?
5-Where are the custom CSS settings stored?

Also, a somehow more general question: I suppose that for the purposes of the reader,
every paragraph is internally tagged as <p> or <div something> or even some unique
ID. Can someone explain? Is it possible to access those tags or at least the count, as it
is provided in the “Reference Mode”?

Thanks a lot.
pollito pito is offline   Reply With Quote
Old 04-17-2010, 01:13 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,842
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
the reader does support jquery (it's builtin). But there's no easy way to add plugins, short of editing the source code.

the reader doesn't store an id for paragraphs, instead the reference number is calculated each time it's needed. That javascript to do this is in the resources/viewer directory of the calibre install.

You can just add any javascript you want to these files to make it avaialble to the viewer.
kovidgoyal is offline   Reply With Quote
Advert
Old 04-17-2010, 05:56 AM   #3
pollito pito
i warned you ...
pollito pito doesn't litterpollito pito doesn't litterpollito pito doesn't litter
 
pollito pito's Avatar
 
Posts: 54
Karma: 222
Join Date: Apr 2010
Device: none
Quote:
Originally Posted by kovidgoyal View Post
the reader does support jquery (it's builtin). But there's no easy way to add plugins, short of editing the source code.
Sorry, no python for me...
Quote:
Originally Posted by kovidgoyal View Post
the reader doesn't store an id for paragraphs, instead the reference number is calculated each time it's needed. That javascript to do this is in the resources/viewer directory of the calibre install.
I see it. But where the custom CSS settings are stored?
Quote:
Originally Posted by kovidgoyal View Post
You can just add any javascript you want to these files to make it avaialble to the viewer.
I add my fuctions to some of the files, but how do I call them? Or you mean that may be I could replace the , lets say, referencing.js with my ouwn referencing.js ?
Thank you very much.
pollito pito is offline   Reply With Quote
Old 04-17-2010, 06:01 AM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,842
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
you link to the javascript event handlers and have them call your code. like onmouseover or click or ready.

custom css can be edited in the viewer preferences.
kovidgoyal is offline   Reply With Quote
Old 04-17-2010, 07:15 AM   #5
pollito pito
i warned you ...
pollito pito doesn't litterpollito pito doesn't litterpollito pito doesn't litter
 
pollito pito's Avatar
 
Posts: 54
Karma: 222
Join Date: Apr 2010
Device: none
Quote:
Originally Posted by kovidgoyal View Post
you link to the javascript event handlers and have them call your code. like onmouseover or click or ready.
OK, I got it. I will see what can be done there.
Quote:
Originally Posted by kovidgoyal View Post
custom css can be edited in the viewer preferences.
Yes, but where, like in what file, are they saved/stored?
Thanks again, for the answers and for the magnificent CALIBRE.
pollito pito is offline   Reply With Quote
Advert
Old 04-17-2010, 07:44 AM   #6
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,842
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
In one of the preference files, cant recall which. Look int he config directory accessible via Preferences->advanced
kovidgoyal is offline   Reply With Quote
Old 04-17-2010, 08:09 AM   #7
pollito pito
i warned you ...
pollito pito doesn't litterpollito pito doesn't litterpollito pito doesn't litter
 
pollito pito's Avatar
 
Posts: 54
Karma: 222
Join Date: Apr 2010
Device: none
Quote:
Originally Posted by kovidgoyal View Post
In one of the preference files, cant recall which. Look int he config directory accessible via Preferences->advanced
It is in "viewer.py"
Thanks, now i can start my hacking
I'll report on any success ...
pollito pito is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Two columns display in the viewer? femto Calibre 4 06-02-2020 04:45 PM
Two facing pages in the viewer …solved!! pollito pito Calibre 18 08-26-2015 05:15 PM
Two columns display in the viewer? again...? pollito pito Calibre 1 12-11-2010 11:29 PM
Converting PDF's with facing pages BrentB Calibre 1 02-14-2010 05:39 PM
Turning Scanned PDFs with facing pages into single pages jimteacher Workshop 5 11-09-2009 02:59 PM


All times are GMT -4. The time now is 12:10 AM.


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