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 ## Changelog
### v0.12.1
*2011-07-29*
* fixed unchecked use of console.log
### v0.12 ### v0.12
*2011-07-28* *2011-07-28*

View file

@ -3,7 +3,7 @@ custom = true
# project # project
project.name = h5ai project.name = h5ai
project.version = 0.12 project.version = 0.12.1
# src # 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 ); var path = pathCache.getPathForTableRow( document.location.pathname, this );
$ul.append( path.updateExtendedHtml() ); $ul.append( path.updateExtendedHtml() );
} ); } );
$.timer.log( "end entries" ); $.timer.log( "end entries" );
$( "#table" ).remove(); $( "#table" ).remove();
$( "#extended" ).append( $ul ); $( "#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 // empty
if ( $ul.children( ".entry:not(.parentfolder)" ).size() === 0 ) { if ( $ul.children( ".entry:not(.parentfolder)" ).size() === 0 ) {

View file

@ -6,14 +6,21 @@
// @include "inc/h5ai.js" // @include "inc/h5ai.js"
// @include "inc/tree.js" // @include "inc/tree.js"
// http://paulirish.com/2009/log-a-lightweight-wrapper-for-consolelog/
var Timer = function () { $.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.start = new Date().getTime();;
this.last = this.start; this.last = this.start;
this.log = function ( label ) { this.log = function ( label ) {
var now = new Date().getTime(); 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; this.last = now;
}; };
}; };