mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-29 06:27:49 +00:00
Poll until Firebug-lite is loaded.
Former-commit-id: c568ed963fc5716c2c84d63aba45a8ef258c1e7b
This commit is contained in:
@@ -34,14 +34,22 @@
|
||||
}());
|
||||
|
||||
window.onload = function() {
|
||||
var fbUI = document.getElementById('FirebugUI'),
|
||||
fbDoc = (fbDoc = fbUI.contentWindow || fbUI.contentDocument).document || fbDoc,
|
||||
sibling = document.getElementsByTagName('script')[0],
|
||||
script = document.createElement('script');
|
||||
function init() {
|
||||
var fbUI = document.getElementById('FirebugUI'),
|
||||
fbDoc = fbUI && (fbDoc = fbUI.contentWindow || fbUI.contentDocument).document || fbDoc;
|
||||
|
||||
fbUI.style.height = fbDoc.body.style.height = fbDoc.documentElement.style.height = '100%';
|
||||
script.src = 'perf.js?t=' + (+new Date);
|
||||
sibling.parentNode.insertBefore(script, sibling);
|
||||
if (!fbDoc || !fbDoc.body) {
|
||||
return setTimeout(init, 15);
|
||||
}
|
||||
var sibling = document.getElementsByTagName('script')[0],
|
||||
script = document.createElement('script');
|
||||
|
||||
fbUI.style.height = fbDoc.body.style.height = fbDoc.documentElement.style.height = '100%';
|
||||
script.src = 'perf.js?t=' + (+new Date);
|
||||
sibling.parentNode.insertBefore(script, sibling);
|
||||
|
||||
}
|
||||
init();
|
||||
};
|
||||
</script>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user