Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Viewer

Notices

Reply
 
Thread Tools Search this Thread
Old 08-14-2021, 09:37 AM   #1
peoro
Junior Member
peoro began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Aug 2021
Device: none
Allow displaying the page's scrollbar

I like to use the Calibre Viewer in Flow Mode with a scrollbar that shows how far into the current page I am.

The browser's scrollbar would be perfect for this and has the further advantage that one could freely style it.

I got close to enable it through the custom style:

Code:
html {
    padding-right: 12px;
    overflow: auto !important;
    overflow-x: hidden !important;
}
However it won't show because the Viewer sets its "display" property to "none":

Code:
html::-webkit-scrollbar, body::-webkit-scrollbar {
    display: none !important;
}
It seems like there's not a clear way to undo this.

Would it be possible to allow displaying the scrollbar?

I'm thinking that the simplest way to do this, which could help with any other similar issue in the future, would be allowing the user to define some custom JavaScript code in the book's iframe, just like we can now define some custom styles.
peoro is offline   Reply With Quote
Old 08-14-2021, 11:27 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,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
I'm afraid there is no way you can override that. If you want to see your progress in the current file you can do that in viewer rpeferences->headers and footers->add "position in chapter" to either the headers or footers.
kovidgoyal is online now   Reply With Quote
Advert
Old 08-14-2021, 12:35 PM   #3
peoro
Junior Member
peoro began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Aug 2021
Device: none
Well, I can show the scrollbar by opening the inspector and modifying the DOM, which is what I'm doing.

I wish it was possible to do this automatically, for instance by adding a custom script to every page, like we can do with styles. It's not possible with the current version, but I'm wondering if a similar feature could be added in a future version.

I can try to implement this feature and send a pull request, if you would want to include it.
peoro is offline   Reply With Quote
Old 08-14-2021, 10:51 PM   #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,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
I'm afraid adding custom scripts is a bridge too far for me. it would imply me having to freeze the semantics of the viewers internal JS so as not to break user scripts.
kovidgoyal is online now   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem in displaying full page frankzappa Calibre 1 09-12-2018 09:05 AM
displaying first page or image without rule fxp33 Kobo Reader 3 03-23-2013 08:11 PM
keep displaying last page when in Standby/Power-off dadaniel Onyx Boox 5 12-04-2012 07:10 AM
Sort by and displaying page number JasonAug Library Management 3 04-01-2011 03:45 AM
Displaying the number of the next page. cmm Kobo Reader 4 09-09-2010 10:54 PM


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


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