Fixed unchecked use of console.log.

This commit is contained in:
Lars Jung 2011-07-29 02:36:53 +02:00
parent 5db74d054f
commit 0f681930b3
7 changed files with 19 additions and 6 deletions

View File

@ -17,6 +17,12 @@ please respect their rights.
## Changelog
### v0.12.1
*2011-07-29*
* fixed unchecked use of console.log
### v0.12
*2011-07-28*

View File

@ -3,7 +3,7 @@ custom = true
# project
project.name = h5ai
project.version = 0.12
project.version = 0.12.1
# src

BIN
release/h5ai-0.12.1.tar.gz Normal file

Binary file not shown.

Binary file not shown.

View File

@ -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 ) {

View File

@ -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;
};
};