Skip to content

Instantly share code, notes, and snippets.

@igrek8
Created October 1, 2018 06:03
Show Gist options
  • Save igrek8/898d26286e5131e13c5b050817ba1479 to your computer and use it in GitHub Desktop.
Save igrek8/898d26286e5131e13c5b050817ba1479 to your computer and use it in GitHub Desktop.
document.body.style.paddingBottom = '250px';
const div = document.createElement('div');
Object.assign(div.style, {
position: 'fixed',
bottom: 0,
left: 0,
right: 0,
height: '250px',
opacity: 0.90,
color: 'white',
backgroundColor: 'black',
zIndex: 9999,
padding: '3px',
overflow: 'scroll',
border: '1px solid grey',
borderBottomWidth: 0,
borderLeftWidth: 0,
borderRightWidth: 0,
fontFamily: 'monospace',
fontSize: '10px',
lineHeight: '10px',
});
document.body.append(div);
window.log = (arg) => {
const log = document.createElement('div');
log.innerHTML = `${JSON.stringify(arg, null, 2)}<br /><br />`;
div.prepend(log);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment