Created
November 25, 2015 00:56
-
-
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
This file contains hidden or 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
//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