This commit is contained in:
Kovid Goyal 2016-04-07 20:26:39 +05:30
parent 7b8a045ee4
commit 9b049f63a2
2 changed files with 5 additions and 4 deletions

View File

@ -13,7 +13,7 @@
<div id="page_load_progress"> <div id="page_load_progress">
<progress> <progress>
</progress> </progress>
<div>Loading, please wait&hellip;<div> <div>Loading, please wait&hellip;</div>
<style type="text/css"> <style type="text/css">
#page_load_progress { #page_load_progress {
position:relative; position:relative;

View File

@ -63,7 +63,10 @@ is_running_in_iframe = False # Changed before script is loaded in the iframe
if is_running_in_iframe: if is_running_in_iframe:
init() init()
else: else:
main_js = (document.currentScript or document.scripts[0]).textContent script = document.currentScript or document.scripts[0]
main_js = script.textContent
script.parentNode.removeChild(script) # save some memory
script = undefined
# We wait for all page elements to load, since this is a single page app # We wait for all page elements to load, since this is a single page app
# with a largely empty starting document, we can use this to preload any resources # with a largely empty starting document, we can use this to preload any resources
# we know are going to be needed immediately. # we know are going to be needed immediately.
@ -76,5 +79,3 @@ else:
src = xhr.responseText.replace('AUTORELOAD_PORT', port) src = xhr.responseText.replace('AUTORELOAD_PORT', port)
eval(src) eval(src)
).send() # We must bypass cache as otherwise we could get stale port info ).send() # We must bypass cache as otherwise we could get stale port info