From 389b1d6534261856003ebad6c1200feb94d7bc84 Mon Sep 17 00:00:00 2001 From: Gergely Csucs Date: Wed, 11 Dec 2024 16:22:57 +0100 Subject: [PATCH] jsdelivr update --- cache.js | 20 ----- index.html | 4 +- zoomer.js | 252 ----------------------------------------------------- 3 files changed, 2 insertions(+), 274 deletions(-) delete mode 100644 cache.js delete mode 100644 zoomer.js diff --git a/cache.js b/cache.js deleted file mode 100644 index eee3deb..0000000 --- a/cache.js +++ /dev/null @@ -1,20 +0,0 @@ -class LRUCache { - #map = new Map; - #capacity; - constructor(capacity) { - this.#capacity = capacity; - } - get(key) { - if (!this.#map.has(key)) - return null; - const value = this.#map.get(key); - this.#map.delete(key); - this.#map.set(key, value); - return value; - } - put(key, value) { - while (this.#map.size >= this.#capacity) - this.#map.delete(this.#map.keys().next().value); - this.#map.set(key, value); - } -} diff --git a/index.html b/index.html index 0c7e4b2..775f24d 100644 --- a/index.html +++ b/index.html @@ -68,8 +68,8 @@ width: 0.5em; } - - + +