remove a 100ms dead spot from page load

pull/1/head
Caleb James DeLisle 7 years ago
parent b24e9b84af
commit 845f75f8a7

@ -47,12 +47,15 @@ var afterLoaded = function (req) {
window.addEventListener('message', onReply);
};
var intr = setInterval(function () {
var load0 = function () {
try {
var req = JSON.parse(decodeURIComponent(window.location.hash.substring(1)));
clearInterval(intr);
afterLoaded(req);
} catch (e) { console.error(e); }
}, 100);
} catch (e) {
console.error(e);
setTimeout(load0, 100);
}
};
load0();
}());

Loading…
Cancel
Save