mirror of
https://github.com/TangentFoxy/memex.git
synced 2024-11-22 04:54:23 +00:00
Fix inconsistent data loading.
This commit is contained in:
parent
7e231e4f95
commit
1a7f864492
@ -11,18 +11,11 @@ function Main()
|
|||||||
|
|
||||||
this.install = function()
|
this.install = function()
|
||||||
{
|
{
|
||||||
var client = new XMLHttpRequest();
|
var oReq = new XMLHttpRequest();
|
||||||
client.open('GET', FILELOCATION);
|
oReq.open('GET', FILELOCATION);
|
||||||
client.overrideMimeType("text/plain");
|
oReq.overrideMimeType("text/plain");
|
||||||
client.onreadystatechange = function(req, res)
|
oReq.addEventListener("load", function() { parent.setup(this.responseText); } );
|
||||||
{
|
oReq.send();
|
||||||
if (client.responseText.trim() != '')
|
|
||||||
{
|
|
||||||
client.onreadystatechange = null;
|
|
||||||
parent.setup(client.responseText);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
client.send();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setup = function(data)
|
this.setup = function(data)
|
||||||
|
Loading…
Reference in New Issue
Block a user