mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-31 14:33:54 -04:00
Viewer: Fix restoring user stylesheet to default not being applied until a viewer restart
This commit is contained in:
parent
6ec980c99f
commit
263bb0ce88
@ -49,13 +49,14 @@ def apply_colors():
|
|||||||
|
|
||||||
|
|
||||||
def apply_stylesheet():
|
def apply_stylesheet():
|
||||||
if opts.user_stylesheet:
|
sid = 'calibre-browser-viewer-user-stylesheet'
|
||||||
sid = 'calibre-browser-viewer-user-stylesheet'
|
style = document.getElementById(sid)
|
||||||
style = document.getElementById(sid)
|
if not style:
|
||||||
if not style:
|
if not opts.user_stylesheet:
|
||||||
style = E.style(type='text/css', id=sid)
|
return
|
||||||
document.documentElement.appendChild(style)
|
style = E.style(type='text/css', id=sid)
|
||||||
style.textContent = opts.user_stylesheet
|
document.documentElement.appendChild(style)
|
||||||
|
style.textContent = opts.user_stylesheet
|
||||||
|
|
||||||
|
|
||||||
def apply_settings():
|
def apply_settings():
|
||||||
|
Loading…
x
Reference in New Issue
Block a user