mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Same for sandboxed html on the book details page
This commit is contained in:
parent
26f61556d1
commit
0f18fdefa5
@ -110,7 +110,8 @@ def adjust_all_iframes(ev):
|
|||||||
window.addEventListener('resize', debounce(adjust_all_iframes, 250))
|
window.addEventListener('resize', debounce(adjust_all_iframes, 250))
|
||||||
|
|
||||||
def adjusting_sandboxed_html(html):
|
def adjusting_sandboxed_html(html):
|
||||||
ans = sandboxed_html(html, 'html, body { overflow: hidden }', 'allow-same-origin')
|
css = 'html, body {{ overflow: hidden; color: {} }}'.format(get_color('window-foreground'))
|
||||||
|
ans = sandboxed_html(html, css, 'allow-same-origin')
|
||||||
ans.addEventListener('load', def(ev): adjust_iframe_height(ev.target);)
|
ans.addEventListener('load', def(ev): adjust_iframe_height(ev.target);)
|
||||||
ans.style.height = '50vh'
|
ans.style.height = '50vh'
|
||||||
ans.dataset.last_window_width = '0'
|
ans.dataset.last_window_width = '0'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user