no delay necessary on iitc-script injection

This commit is contained in:
Philipp Schaefer 2013-08-29 17:21:03 +02:00
parent 97ddeafba8
commit d30692399c

View File

@ -132,12 +132,9 @@ public class IITC_WebViewClient extends WebViewClient {
// add all plugins to the script...inject plugins + main script simultaneously // add all plugins to the script...inject plugins + main script simultaneously
js += parsePlugins(); js += parsePlugins();
// need to wrap the mobile iitc.js version in a document ready. IITC // IITC expects to be injected after the DOM has been loaded completely.
// expects to be injected after the DOM has been loaded completely. // since it is injected with the onPageFinished() event, no further delay is necessary.
// Since the mobile client injects IITC by replacing the gen_dashboard this.mIitcScript = js;
// file, IITC runs to early. The document.ready delays IITC long enough
// so it boots correctly.
this.mIitcScript = "setTimeout(function(){" + js + "},1);";
} }