From dd776936d655be77f5d091dcadafe2b23ed93a52 Mon Sep 17 00:00:00 2001 From: awsr <43862868+awsr@users.noreply.github.com> Date: Fri, 13 Feb 2026 22:53:53 -0800 Subject: [PATCH] Remove previous error handler - New fallback seems to be more stable than previous tries. --- javascript/gallery.js | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/javascript/gallery.js b/javascript/gallery.js index 722a2909b..bfa42c357 100644 --- a/javascript/gallery.js +++ b/javascript/gallery.js @@ -188,7 +188,6 @@ function updateGalleryStyles() { class HashSet extends Set { constructor(val) { super(val); - // Using a variable to store a counter has sometimes been unreliable in the past this.fallback = 0; } @@ -214,7 +213,6 @@ class SimpleProgressBar { #hideTimeout = null; #interval = null; #max = 0; - #errorState = false; /** @type {Set} */ #monitoredSet; @@ -231,7 +229,6 @@ class SimpleProgressBar { } start(total) { - if (this.#errorState) return; this.clear(); this.#max = total; this.#interval = setInterval(() => { @@ -248,7 +245,6 @@ class SimpleProgressBar { clear() { this.#stop(); - this.#errorState = false; clearTimeout(this.#hideTimeout); this.#hideTimeout = null; this.#container.style.display = 'none'; @@ -257,20 +253,6 @@ class SimpleProgressBar { this.#text.textContent = ''; } - error(message) { - if (!this.#errorState) { - this.#errorState = true; - this.#stop(); - this.#container.style.display = 'block'; - this.#visible = true; - clearTimeout(this.#hideTimeout); - this.#text.textContent = message; - this.#hideTimeout = setTimeout(() => { - this.clear(); - }, 2000); - } - } - #update(loaded, max) { if (this.#hideTimeout) { this.#hideTimeout = null; @@ -483,7 +465,6 @@ class GalleryFile extends HTMLElement { this.hash = await getHash(`${this.src}/${this.size}/${this.mtime}`) .catch((err) => { error('getHash:', err); - galleryProgressBar.error('File hash error'); return null; }); const cachedData = (this.hash && opts.browser_cache) ? await idbGet(this.hash).catch(() => undefined) : undefined;