From 09e7db70d930eba10913a89df9049c4b57f90075 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Sun, 30 Nov 2025 01:55:35 -0500 Subject: [PATCH] Make cache progress indicator clickable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The 'Caching for offline' indicator is now a link to /offline page. Also added toLocaleString() for page count formatting. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- kjvstudy_org/templates/base.html | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/kjvstudy_org/templates/base.html b/kjvstudy_org/templates/base.html index c7bb7ba..66d0957 100644 --- a/kjvstudy_org/templates/base.html +++ b/kjvstudy_org/templates/base.html @@ -2289,9 +2289,10 @@ var cacheIndicator = null; function showCacheProgress(cached, total) { if (!cacheIndicator) { - cacheIndicator = document.createElement('div'); + cacheIndicator = document.createElement('a'); cacheIndicator.id = 'cache-indicator'; - cacheIndicator.style.cssText = 'position:fixed;bottom:1rem;left:1rem;padding:0.5rem 1rem;background:#4a7c59;color:white;border-radius:4px;font-size:0.85rem;z-index:9999;box-shadow:0 2px 8px rgba(0,0,0,0.2);transition:opacity 0.3s;'; + cacheIndicator.href = '/offline'; + cacheIndicator.style.cssText = 'position:fixed;bottom:1rem;left:1rem;padding:0.5rem 1rem;background:#4a7c59;color:white;border-radius:4px;font-size:0.85rem;z-index:9999;box-shadow:0 2px 8px rgba(0,0,0,0.2);transition:opacity 0.3s;text-decoration:none;cursor:pointer;'; document.body.appendChild(cacheIndicator); } var pct = Math.round((cached / total) * 100); @@ -2301,7 +2302,7 @@ function showCacheComplete(total) { if (cacheIndicator) { - cacheIndicator.innerHTML = 'Ready for offline! (' + total + ' pages)'; + cacheIndicator.innerHTML = 'Ready for offline! (' + total.toLocaleString() + ' pages)'; setTimeout(function() { cacheIndicator.style.opacity = '0'; setTimeout(function() {