Skip to content

Instantly share code, notes, and snippets.

@mattlockyer
Created November 25, 2015 00:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattlockyer/aceef926f04709ac4e56 to your computer and use it in GitHub Desktop.
Save mattlockyer/aceef926f04709ac4e56 to your computer and use it in GitHub Desktop.
No line numbers but you can log(...msg...) to this console and see it on a mobile device
//mobile console
(function() {
var el = document.createElement('div'),
s = el.style;
//s.display = 'none'; //enable for production
s.position = 'fixed';
s.bottom = '0px';
s.left = '0px';
s.background = 'white';
s.width = '100%';
s.height = '97px';
s.borderTop = '1px solid black';
s.fontSize = '10px';
s.fontFamily = 'Verdana';
s.padding = '4px';
s.lineHeight = '10px';
s.zIndex = 999999;
s.overflow = 'hidden';
s.overflowY = 'scroll';
document.body.appendChild(el);
//log
window.log = function(msg) {
el.innerHTML += msg + '<br />';
el.scrollTop = 9999999;
console.log(msg);
};
}());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment