22 lines
338 B
JavaScript
22 lines
338 B
JavaScript
function History(rune)
|
|
{
|
|
Module.call(this,rune);
|
|
|
|
this.lines = [];
|
|
|
|
this.active = function(cmd)
|
|
{
|
|
console.log(this.lines);
|
|
}
|
|
|
|
this.add = function(content)
|
|
{
|
|
this.lines.push(content);
|
|
}
|
|
|
|
this.widget = function()
|
|
{
|
|
if(this.lines.length === 0){ return "";}
|
|
return "^ "+this.lines.length+" ";
|
|
}
|
|
} |