let consoleLog = console.log
let consoleError = console.error
let consoleWarn = console.warn
const containerStyles = {
position: 'fixed',
overflow: 'scroll',
width: '300px',
height: '450px',
display: 'none',
bottom: '85px',
zIndex: 100000,
wordWrap: 'break-word',
overflowWrap: 'break-word',
right: '20px',
marginLeft: '15px',
backgroundColor: '#fff',
borderRadius: '8px',
boxShadow: '2px 4px 5px 3px rgba(224, 224, 224, 0.8)'
}
const floatButtonStyles = {
opacity: 0.8,
position: 'fixed',
width: '70px',
border: 'none',
height: '35px',
bottom: '40px',
zIndex: 100000,
right: '15px',
backgroundColor: '#d4ebf2',
color: '#fff',
borderRadius: '50px',
textAlign: 'center',
cursor: 'pointer'
}
const buttonDefaultOpacity = {
opacity: 1
}
const listItemStyles = {
fontFamily: 'Arial',
fontSize: '13px',
paddingTop: '5px',
paddingBottom: '5px',
paddingLeft: '15px',
paddingRight: '15px'
}
const clearBtnStyles = {
cursor: 'pointer',
float: 'right',
paddingRight: '10px',
paddingTop: '3px',
opacity: 0.5,
fontSize: '15px',
backgroundColor: 'transparent',
border: 'none'
}
const logoTextStyles = {
fontFamily: 'Arial',
fontSize: '16px',
fontWeight: 'bold',
paddingLeft: '15px',
paddingTop: '3px',
fontStyle: 'italic',
color: '#525EF9'
}
const notificationBadgeStyles = {
position: 'absolute',
display: 'none',
top: '-3px',
right: '6px',
width: '12px',
height: '12px',
borderRadius: '50%',
backgroundColor: 'red'
}
let outfrontLogUl = document.createElement('UL') // Memory leak alert
const notificationBadge = document.createElement('SPAN') // Memory leak alert
const createButtonAndContainer = () => {
try {
// Create container start
const container = document.createElement('DIV')
container.id = 'outfront-container'
for (let property in containerStyles) {
container.style[property] = containerStyles[property]
}
// Create container end
// Create clear console button start
const clearBtn = document.createElement('BUTTON') // button
clearBtn.id = 'outfront-clear-btn'
clearBtn.innerText = '⟲' // Snippet is not live.
Travelled to 3 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx
No comments. add comment
| Snippet ID: | #2000598 |
| Snippet name: | outfront.js - show js console on mobile browser |
| Eternal ID of this version: | #2000598/1 |
| Text MD5: | acc3693c730b7335af3bb35ae5083ad0 |
| Author: | stefan |
| Category: | js |
| Type: | New Tinybrain snippet |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2021-08-26 16:50:48 |
| Source code size: | 2263 bytes / 99 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 385 / 108 |
| Referenced in: | #2000599 - outfront.js - show js console on mobile browser [fixed] |