mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-07 10:07:48 +00:00
Cleanup perf/index.html.
Former-commit-id: 7592ee8ec0c6b2bb85d93d7dc599d814ef5a1eef
This commit is contained in:
@@ -27,23 +27,10 @@
|
|||||||
<script src="perf.js"></script>
|
<script src="perf.js"></script>
|
||||||
<script>
|
<script>
|
||||||
(function() {
|
(function() {
|
||||||
if (/[?&]nojava=true(?:&|$)/.test(location.search)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
var measured,
|
var measured,
|
||||||
perfNow,
|
perfNow,
|
||||||
begin = new Date;
|
begin = new Date;
|
||||||
|
|
||||||
// is the applet really needed?
|
|
||||||
while (!(measured = new Date - begin)) { }
|
|
||||||
if (measured != 1 && !((perfNow = window.performance) && typeof (perfNow.now || perfNow.webkitNow) == 'function')) {
|
|
||||||
// load applet
|
|
||||||
document.write('<applet code="nano" archive="../vendor/benchmark.js/nano.jar"></applet>');
|
|
||||||
}
|
|
||||||
}());
|
|
||||||
</script>
|
|
||||||
<script>
|
|
||||||
(function() {
|
|
||||||
function init() {
|
function init() {
|
||||||
var fbUI = document.getElementById('FirebugUI'),
|
var fbUI = document.getElementById('FirebugUI'),
|
||||||
fbDoc = fbUI && (fbDoc = fbUI.contentWindow || fbUI.contentDocument).document || fbDoc,
|
fbDoc = fbUI && (fbDoc = fbUI.contentWindow || fbUI.contentDocument).document || fbDoc,
|
||||||
@@ -56,6 +43,15 @@
|
|||||||
setTimeout(run, 15);
|
setTimeout(run, 15);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// is the applet permitted?
|
||||||
|
if (!/[?&]nojava=true(?:&|$)/.test(location.search)) {
|
||||||
|
// is the applet really needed?
|
||||||
|
while (!(measured = new Date - begin)) { }
|
||||||
|
if (measured != 1 && !((perfNow = window.performance) && typeof (perfNow.now || perfNow.webkitNow) == 'function')) {
|
||||||
|
// load applet
|
||||||
|
document.write('<applet code="nano" archive="../vendor/benchmark.js/nano.jar"></applet>');
|
||||||
|
}
|
||||||
|
}
|
||||||
window.onload = init;
|
window.onload = init;
|
||||||
}());
|
}());
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user