I\'d like to know if there is a way in javascript to retrieve console history.
What I mean by console history is what appears in the dev tools console. For instance,
console.history = [];
var oldConsole = {};
for (var i in console) {
if (typeof console[i] == 'function') {
oldConsole[i] = console[i];
var strr = '(function(){\
console.history.push({func:\'' + i + '\',args : Array.prototype.slice.call(arguments)});\
oldConsole[\'' + i + '\'].apply(console, arguments);\
})';
console[i] = eval(strr);
}
}
And then use console.history to access history