18 lines
421 B
JavaScript
18 lines
421 B
JavaScript
/* LOG UNE ACTION
|
|
*
|
|
* @message<String> Appends the message to the log history
|
|
*
|
|
*/
|
|
var logs = [];
|
|
|
|
var log = function(message, title){
|
|
title = title || null;
|
|
|
|
var index = logs.push( document.createElement('span') ) - 1;
|
|
|
|
logs[index].innerHTML = '';
|
|
logs[index].innerHTML += (title) ? '<strong>'+title+'</strong> ' : '';
|
|
logs[index].innerHTML += message;
|
|
$('body > div#log').appendChild( logs[index] );
|
|
};
|