Created
September 9, 2020 18:32
-
-
Save tlowrimore/bee2580882f6eb23797e2ed0d319c4ad to your computer and use it in GitHub Desktop.
A janky-ass console logger for debugging web apps in iOS Safari, when you don't just have a Mac lying around for accessing a debug console.
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
function jankylog(msg) { | |
let konsole = document.getElementById('jankylog'); | |
if(!konsole) { | |
konsole = document.createElement('pre'); | |
konsole.id = 'jankylog'; | |
konsole.style.backgroundColor = 'white'; | |
konsole.style.padding = '1rem'; | |
document.body.append(konsole); | |
} | |
konsole.append(`>>> ${JSON.stringify(msg, undefined, 2)}\n`); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment