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
javascript: | |
(function(){ | |
try { | |
let cls = 0; | |
const canvas = document.createElement('canvas'); | |
canvas.style.width = '100%'; | |
canvas.style.height = '100%'; | |
canvas.width = window.innerWidth; | |
canvas.height = window.innerHeight; | |
canvas.style.position = 'absolute'; |
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
javascript: | |
new PerformanceObserver((entryList)=>{ | |
for (const entry of entryList.getEntries()) { | |
let consoleGroup = `%cLCP candidate: ${Math.round(entry.startTime)}ms`; | |
let styles = ''; | |
if (entry.startTime >= 2500) { | |
styles = 'color: red;'; | |
} | |
console.group(consoleGroup, styles); | |
console.log('Element:', entry.element); |
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
javascript: | |
new PerformanceObserver((entryList)=>{ | |
for (const entry of entryList.getEntries()) { | |
const delay = entry.processingStart - entry.startTime; | |
let consoleGroup = `%cFID value: ${Math.round(delay)}ms`; | |
let styles = ''; | |
if (delay >= 100) { | |
styles = 'color: red;'; | |
} | |
console.group(consoleGroup, styles); |
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
javascript: | |
document.documentElement.innerHTML = ''; | |
for (const obj of [document, window]) { | |
for (const event of Object.values(getEventListeners(obj))) { | |
for (const {type, listener, useCapture} of event) { | |
obj.removeEventListener(type, listener, useCapture) | |
} | |
} | |
} | |
console. clear(); |