mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-09-02 10:23:16 +02:00
Fixed unchecked use of console.log.
This commit is contained in:
@@ -219,11 +219,11 @@ var H5ai = function ( options, langs, pathCache ) {
|
||||
var path = pathCache.getPathForTableRow( document.location.pathname, this );
|
||||
$ul.append( path.updateExtendedHtml() );
|
||||
} );
|
||||
$.timer.log( "end entries" );
|
||||
$.timer.log( "end entries" );
|
||||
$( "#table" ).remove();
|
||||
|
||||
$( "#extended" ).append( $ul );
|
||||
console.log( "folders", $( "#extended .folder" ).size() , "files", $( "#extended .file" ).size() );
|
||||
$.log( document.location.pathname, "folders:", $( "#extended .folder" ).size() , "files:", $( "#extended .file" ).size() );
|
||||
|
||||
// empty
|
||||
if ( $ul.children( ".entry:not(.parentfolder)" ).size() === 0 ) {
|
||||
|
@@ -6,14 +6,21 @@
|
||||
// @include "inc/h5ai.js"
|
||||
// @include "inc/tree.js"
|
||||
|
||||
|
||||
var Timer = function () {
|
||||
// http://paulirish.com/2009/log-a-lightweight-wrapper-for-consolelog/
|
||||
$.log = function () {
|
||||
$.log.history = $.log.history || [];
|
||||
$.log.history.push( arguments );
|
||||
if ( window.console ) {
|
||||
window.console.log( Array.prototype.slice.call( arguments ) );
|
||||
};
|
||||
};
|
||||
|
||||
var Timer = function () {
|
||||
this.start = new Date().getTime();;
|
||||
this.last = this.start;
|
||||
this.log = function ( label ) {
|
||||
var now = new Date().getTime();
|
||||
console.log( "timer", label, "+" + (now - this.last), "=" + (now - this.start) );
|
||||
$.log( "timer", label, "+" + (now - this.last), "=" + (now - this.start) );
|
||||
this.last = now;
|
||||
};
|
||||
};
|
||||
|
Reference in New Issue
Block a user