mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-12-08 20:48:48 +00:00
Error-reporting over mail also
This commit is contained in:
@@ -1,12 +1,16 @@
|
||||
var Helper = {
|
||||
|
||||
logs: [],
|
||||
log: function(to_log) {
|
||||
if(localStorage.debug === "true") {
|
||||
console.log("------------");
|
||||
console.log("------------ " + new Date());
|
||||
for(var i = 0; i < to_log.length; i++) {
|
||||
console.log(to_log[i]);
|
||||
}
|
||||
console.log("------------");
|
||||
console.log("------------ " + new Date());
|
||||
}
|
||||
Helper.logs.unshift({log: to_log, date: new Date()});
|
||||
if(Helper.logs.length > 10) {
|
||||
Helper.logs.splice(-1, Helper.logs.length - 10);
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user