()
| 111 | } |
| 112 | |
| 113 | function hasSomeStyle() { |
| 114 | if (document.querySelector(COLOR_SCHEME_META_SELECTOR) != null) { |
| 115 | return true; |
| 116 | } |
| 117 | if (document.documentElement.style.backgroundColor || (document.body && document.body.style.backgroundColor)) { |
| 118 | return true; |
| 119 | } |
| 120 | for (const style of document.styleSheets) { |
| 121 | if (style && style.ownerNode && !((style.ownerNode as HTMLElement).classList && (style.ownerNode as HTMLElement).classList.contains('darkreader'))) { |
| 122 | return true; |
| 123 | } |
| 124 | } |
| 125 | return false; |
| 126 | } |
| 127 | |
| 128 | let observer: MutationObserver | null; |
| 129 | let readyStateListener: (() => void) | null; |
no outgoing calls
no test coverage detected
searching dependent graphs…