MCPcopy
hub / github.com/ChinaGodMan/UserScripts / logger

Function logger

youtube-dynamic-grid/youtube-dynamic-grid.user.js:412–422  ·  view source on GitHub ↗
(message, level = 'info')

Source from the content-addressed store, hash-verified

410 * @param {'info' | 'debug' | 'error'} [level='info'] - Log level
411 */
412 const logger = (message, level = 'info') => {
413 const isDebug = window.location.search.includes('debug=1')
414 if (
415 level === 'error' ||
416 (isDebug && (level === 'info' || level === 'debug'))
417 ) {
418 console[level === 'error' ? 'error' : 'log'](
419 `[YouTube Dynamic Grid][${level}] ${message}`
420 )
421 }
422 }
423
424 // Grid Management Functions
425 const GridManager = {

Callers 15

calculateItemsPerRowFunction · 0.85
updateGridFunction · 0.85
injectCSSFunction · 0.85
removeCSSFunction · 0.85
tryUpdateFunction · 0.85
pollGridFunction · 0.85
handleNavigationFunction · 0.85
monitorNavigationFunction · 0.85
startObserverFunction · 0.85
setupEventListenersFunction · 0.85
resizeHandlerFunction · 0.85
loadHandlerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected