![]() |
#1 |
Junior Member
![]() Posts: 8
Karma: 10
Join Date: Sep 2013
Location: Spain
Device: K4 NT
|
About the background in ebook-viewer
Hello,
I am using Calibre Portable 2.37, in ebook-viewer -> options -> user stylesheet there is an option for set the background, example: background-image:url("file:///d:/calibre portable/mybackground.jpg"); The path is absolute and I can't figure how to make it relative, so always having my background image irrespective from path I am running Calibre. Is it possible to have a relative path for the background image? ![]() Thanks in advance (sorry for my bad english) |
![]() |
![]() |
![]() |
#2 |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Well, I've never tried this particularly, but the PortableApps.com edition of calibre uses the standard PAF launcher which (among other things) fixes filepaths when the drive letter changes.
Presumably, it will fix this one too, if not then that is a bug in their launcher code and they'll fix it. ![]() As for the "official" calibre portable, it doesn't really mess with the configuration at all (it merely uses the config relocation environment variables, and passes the --with-library switch) so you are probably out of luck with it. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,630
Karma: 29710510
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Sadly one can't use environment variables in file system uri's because the '%' is used for character encoding (eg space %20)
Maybe one day the IETF will devise a way to overcome that restriction, or MS will allow substitution of the '%envvarname%' convention by say a '$envvarname' convention. Although I'm not holding my breath on either. You could write some javascript in the CSS. There's some VBA code somewhere that addresses the issue - I have seen it used in Excel macro's. Conversion of VBA to JS is doable. BR |
![]() |
![]() |
![]() |
#4 |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Well, I remember being able to type environment variables into Windows Explorer...
|
![]() |
![]() |
![]() |
#5 |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,630
Karma: 29710510
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Yes I use it all the time - in fact my file mangler offers me a list of them in its address bar - but that's native windows which is not IETF RFC 3886 compliant.
Windows is not compliant, because 1808, which 3886 obsoletes, wasn't published until 1995! The %---% convention was in CP/M (Kildall may have copied it from TOPS 10 or RT/11 - or even CMS), from there it went into QDOS which begat MS/PC-DOS in 1981! And here we are today with... what we've got and not got. BR Last edited by BetterRed; 11-19-2015 at 06:05 PM. Reason: spelling |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,306
Karma: 78876004
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
|
I remember using both TOPS 10 and RT/11
![]() |
![]() |
![]() |
![]() |
#7 |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Wouldn't matter anyway, because URLs are literal AFAIk unless the program in question explicitly parses it and replaces variables.
|
![]() |
![]() |
![]() |
#8 |
Junior Member
![]() Posts: 8
Karma: 10
Join Date: Sep 2013
Location: Spain
Device: K4 NT
|
It seems I am out of luck
![]() It's not a big deal tough, I think I will try the PortableApps version Thanks ![]() ![]() |
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Two suggestions: Background color + zoom in images viewer/editor | arspr | Editor | 7 | 08-05-2014 04:41 PM |
Problem with font & background colors on the Ebook Viewer | darthktulu | Calibre | 3 | 10-27-2013 11:24 PM |
Get the file path of the ebook in the frontmost Ebook Viewer window | johnsidi | Development | 1 | 07-16-2012 10:37 AM |
[old-topic]ebook-viewer: Open source, crossplatform viewer for EPUB, LIT, MOBI, etc | kovidgoyal | Calibre | 68 | 05-30-2011 08:46 PM |
# user css for viewer.py/ ebook-viewer/ prs-650 | tscamera | Calibre | 0 | 01-02-2011 06:28 PM |