File size: 483 Bytes
abcf568 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | export function debugImageLightbox(event: string, payload: Record<string, unknown>): void {
if (typeof window === 'undefined') {
return
}
const debugFlag = window.localStorage.getItem('manimcat:debug:image-lightbox')
const globalDebug = (window as typeof window & { __MANIMCAT_DEBUG_IMAGE_LIGHTBOX__?: boolean }).__MANIMCAT_DEBUG_IMAGE_LIGHTBOX__
if (debugFlag !== '1' && globalDebug !== true) {
return
}
console.debug(`[image-lightbox] ${event}`, payload)
}
|