mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-23 04:45:27 +01:00
Avoid JS errors when previewing non html documents such as svg images
This commit is contained in:
parent
37c35a1ec4
commit
2fa3561aef
1 changed files with 9 additions and 8 deletions
|
|
@ -207,12 +207,13 @@ def load_mathjax():
|
|||
document.head.appendChild(script)
|
||||
|
||||
|
||||
document.body.addEventListener('click', onclick, True)
|
||||
document.documentElement.appendChild(E.style(
|
||||
type='text/css',
|
||||
'[data-in-split-mode="1"] [data-is-block="1"]:hover { cursor: pointer !important; border-top: solid 5px green !important }'
|
||||
))
|
||||
if document.body:
|
||||
document.body.addEventListener('click', onclick, True)
|
||||
document.documentElement.appendChild(E.style(
|
||||
type='text/css',
|
||||
'[data-in-split-mode="1"] [data-is-block="1"]:hover { cursor: pointer !important; border-top: solid 5px green !important }'
|
||||
))
|
||||
|
||||
fix_fullscreen_svg_images()
|
||||
if check_for_maths():
|
||||
load_mathjax()
|
||||
fix_fullscreen_svg_images()
|
||||
if check_for_maths():
|
||||
load_mathjax()
|
||||
|
|
|
|||
Loading…
Reference in a new issue