mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Micro-optimization
This commit is contained in:
parent
d0c34d2131
commit
dcc0818e81
@ -13,10 +13,9 @@ autoreload_enabled = False
|
|||||||
AUTO_UPDATE_THRESHOLD = 1000 # millisecs
|
AUTO_UPDATE_THRESHOLD = 1000 # millisecs
|
||||||
|
|
||||||
|
|
||||||
def iframe_main():
|
def iframe_main(script):
|
||||||
script = document.getElementById('bootstrap')
|
|
||||||
if script:
|
|
||||||
script.parentNode.removeChild(script) # free up some memory
|
script.parentNode.removeChild(script) # free up some memory
|
||||||
|
script = undefined
|
||||||
m = ρσ_get_module(window.iframe_entry_point)
|
m = ρσ_get_module(window.iframe_entry_point)
|
||||||
main = m?.main
|
main = m?.main
|
||||||
if main:
|
if main:
|
||||||
@ -56,6 +55,6 @@ def toplevel_main():
|
|||||||
if document?:
|
if document?:
|
||||||
iframe_script = document.getElementById('bootstrap')
|
iframe_script = document.getElementById('bootstrap')
|
||||||
if iframe_script:
|
if iframe_script:
|
||||||
iframe_main()
|
iframe_main(iframe_script)
|
||||||
else:
|
else:
|
||||||
toplevel_main()
|
toplevel_main()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user