04-16-2010, 06:55 PM | #1 |
i warned you ...
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. |
04-17-2010, 01:13 AM | #2 |
creator of calibre
Posts: 44,399
Karma: 23798586
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. |
Advert | |
|
04-17-2010, 05:56 AM | #3 | |||
i warned you ...
Posts: 54
Karma: 222
Join Date: Apr 2010
Device: none
|
Quote:
Sorry, no python for me... Quote:
I see it. But where the custom CSS settings are stored? Quote:
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.
|
|||
04-17-2010, 06:01 AM | #4 |
creator of calibre
Posts: 44,399
Karma: 23798586
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. |
04-17-2010, 07:15 AM | #5 | |
i warned you ...
Posts: 54
Karma: 222
Join Date: Apr 2010
Device: none
|
Quote:
OK, I got it. I will see what can be done there. Yes, but where, like in what file, are they saved/stored? Thanks again, for the answers and for the magnificent CALIBRE.
|
|
Advert | |
|
04-17-2010, 07:44 AM | #6 |
creator of calibre
Posts: 44,399
Karma: 23798586
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
|
04-17-2010, 08:09 AM | #7 |
i warned you ...
Posts: 54
Karma: 222
Join Date: Apr 2010
Device: none
|
|
|
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 |