Skip to content

Instantly share code, notes, and snippets.

@catdad
Created November 10, 2017 15:43
Show Gist options
  • Save catdad/bb2d4a2718af55624735d9ae4810347c to your computer and use it in GitHub Desktop.
Save catdad/bb2d4a2718af55624735d9ae4810347c to your computer and use it in GitHub Desktop.
Sometimes, this is all you need for some quick mobile debugging.
<script src="//catdad.github.io/tiny.cdn/lib/toast/1.0.0/toast.min.js"></script>
<script>
(function () {
function logger(type) {
return function () {
toast[type]([].reduce.call(arguments, function (memo, arg) {
return memo + ' ' + arg.toString();
}, ''));
};
}
window.console = {
log: logger('log'),
error: logger('error')
};
}());
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment