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