Browsing http://slowe.github.io/VirtualSky/ or https://slowe.github.io/VirtualSky/custom with Internet Explorer 11 hungs up the browser screen.
When I checked whith the vevelopment tool, loading of the language file en.json was repeated infinitely.
The cause of this problem is that following line in stuquery.js causes an error on IE11.
|
if(typeof rsp==="string") rsp = JSON.parse(rsp.replace(/[\n\r]/g,"\\n").replace(/^([^\(]+)\((.*)\)([^\)]*)$/,function(e,a,b,c){ return (a==cb) ? b:''; }).replace(/\\n/g,"\n")); |
Replacing this line with if(typeof rsp==="string") rsp = JSON.parse(rsp); makes work fine.
replace(/^([^\(]+)\((.*)\)([^\)]*)$/,function(e,a,b,c){ return (a==cb) ? b:''; }) does not work as intended if the string value in JSON contains parentheses and return a broken JSON string, so JSON.parse() fails.
As a result, data is passed as a string value to the loadJSON()'s handler in loadLanguage() of virtualsky.js, so the following assignment opreration fails.
|
this.langs[l].loaded = true; |
As a result, this.langs[code].loaded in the following line becomes undefined, loadLanguage() is called again, and the same language file is loaded infinitely.
|
if(!this.langs[code].loaded) this.loadLanguage(code,fn); |
Browsing http://slowe.github.io/VirtualSky/ or https://slowe.github.io/VirtualSky/custom with Internet Explorer 11 hungs up the browser screen.
When I checked whith the vevelopment tool, loading of the language file
en.jsonwas repeated infinitely.The cause of this problem is that following line in
stuquery.jscauses an error on IE11.VirtualSky/stuquery.js
Line 466 in 501dc07
Replacing this line with
if(typeof rsp==="string") rsp = JSON.parse(rsp);makes work fine.replace(/^([^\(]+)\((.*)\)([^\)]*)$/,function(e,a,b,c){ return (a==cb) ? b:''; })does not work as intended if the string value in JSON contains parentheses and return a broken JSON string, soJSON.parse()fails.As a result,
datais passed as a string value to theloadJSON()'s handler inloadLanguage()ofvirtualsky.js, so the following assignment opreration fails.VirtualSky/virtualsky.js
Line 1105 in 501dc07
As a result,
this.langs[code].loadedin the following line becomesundefined,loadLanguage()is called again, and the same language file is loaded infinitely.VirtualSky/virtualsky.js
Line 1130 in 501dc07