/**************************************************************************************************************** * CLASS console: helper to make console-object available if not present * * implemented as singleton-object * * * * methods: debug(args: variable number and type of arguments):void - dump parameters to console * * * * remarks: creates a css-styled div fixed on bottom of visible screen, if console-object is created * ****************************************************************************************************************/ if (!console) { console = { create: function() { $('body').append($('
')); $('head').append($([ '' ].join("\n"))); }, debug: function() { var time = new Date(); $.each(arguments, function(key, data) { $('#console').html( $('#console').html() +( '(' + ('0' + time.getHours()).substr(-2) + ':' + ('0' + time.getMinutes()).substr(-2) + ':' + ('0' + time.getSeconds()).substr(-2) + ') ' + JSON.stringify(data) + ' [' + typeof(data) + ']' ).replace(/[\r\n]{1,1}/g, '