vendor: 1,388 bytes, lines 1-52
1/*! 2devtools-detect 3https://github.com/sindresorhus/devtools-detect 4By Sindre Sorhus 5MIT License 6*/ 7 8const devtools = { 9 isOpen: false, 10 orientation: undefined, 11}; 12 13const threshold = 160; 14 15const emitEvent = (isOpen, orientation) => { 16 globalThis.dispatchEvent(new globalThis.CustomEvent('devtoolschange', { 17 detail: { 18 isOpen, 19 orientation, 20 }, 21 })); 22}; 23 24const main = ({emitEvents = true} = {}) => { 25 const widthThreshold = globalThis.outerWidth - globalThis.innerWidth > threshold; 26 const heightThreshold = globalThis.outerHeight - globalThis.innerHeight > threshold; 27 const orientation = widthThreshold ? 'vertical' : 'horizontal'; 28 29 if ( 30 !(heightThreshold && widthThreshold) 31 && ((globalThis.Firebug && globalThis.Firebug.chrome && globalThis.Firebug.chrome.isInitialized) || widthThreshold || heightThreshold) 32 ) { 33 if ((!devtools.isOpen || devtools.orientation !== orientation) && emitEvents) { 34 emitEvent(true, orientation); 35 } 36 37 devtools.isOpen = true; 38 devtools.orientation = orientation; 39 } else { 40 if (devtools.isOpen && emitEvents) { 41 emitEvent(false, undefined); 42 } 43 44 devtools.isOpen = false; 45 devtools.orientation = undefined; 46 } 47}; 48 49main({emitEvents: false}); 50setInterval(main, 300); 51 52window.devtools = devtools;
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.