Last active
November 18, 2015 11:01
-
-
Save greggman/8a99fd136f2ed44c93e9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
(function() { | |
var insert = function(e) { | |
var elem = document.createElement("pre"); | |
elem.appendChild(document.createTextNode(Array.prototype.join.call(arguments, " "))); | |
document.body.insertBefore(elem, document.body.firstChild); | |
}; | |
window.addEventListener('error', insert); | |
window.console.log = function(origFn) { | |
return function() { | |
insert(arguments[0]); | |
origFn.apply(window.console, arguments); | |
}; | |
}(window.console.log); | |
}()); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment