MCPcopy Create free account
hub / github.com/Cicada000/VV / _cleanupLocalStorage

Function _cleanupLocalStorage

Web/script.js:275–285  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

273 },
274
275 _cleanupLocalStorage() {
276 try {
277 const cacheKeys = [];
278 for (let i = 0; i < localStorage.length; i++) {
279 const key = localStorage.key(i);
280 if (key.startsWith("indexCache_")) cacheKeys.push(key);
281 }
282 if (cacheKeys.length > 20)
283 for (let i = 0; i < 5; i++) localStorage.removeItem(cacheKeys[i]);
284 } catch (e) {}
285 },
286};
287const watermarkImage = new Image();
288watermarkImage.src = "watermark.png";

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected