MCPcopy Index your code
hub / github.com/darkreader/darkreader / wasEnabledForHost

Function wasEnabledForHost

src/inject/cache.ts:8–20  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6const STORAGE_KEY_CSS_FETCH_PREFIX = '__darkreader__cssFetch_';
7
8export function wasEnabledForHost(): boolean | null {
9 try {
10 const value = sessionStorage.getItem(STORAGE_KEY_WAS_ENABLED_FOR_HOST);
11 if (value === 'true') {
12 return true;
13 }
14 if (value === 'false') {
15 return false;
16 }
17 } catch (err) {
18 }
19 return null;
20}
21
22export function writeEnabledForHost(value: boolean): void {
23 try {

Callers 1

fallback.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected