nandi/gleanpublic⑂ Fork 0
⑂ be4aec4
Commits
⬇ Clone ▾
git clone https://git.rickub.com/nandi/glean.git
git clone ssh://git@rickub.com/nandi/glean.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

Reload page on browser back button navigationUnverified

Julien Robert committed 2026-04-29T12:46:19+02:00 Browse files
be4aec4 parent: 2707cd5
modified internal/tmpl/base.html +6 -0
@@ -310,6 +310,12 @@
310310 applyTheme();
311311 applyShape();
312312
313+ // reload page when page restored from bfcache.
314+ // useful for reloading article read/unread status.
315+ window.addEventListener('pageshow', function(e) {
316+ if (e.persisted) location.reload();
317+ });
318+
313319 function closeAnnotate(el) {
314320 var form = el.closest('.annotate-form');
315321 form.classList.add('hidden');
@@ -310,6 +310,12 @@
310 applyTheme();310 applyTheme();
311 applyShape();311 applyShape();
312 312
313+ // reload page when page restored from bfcache.
314+ // useful for reloading article read/unread status.
315+ window.addEventListener('pageshow', function(e) {
316+ if (e.persisted) location.reload();
317+ });
318+
313 function closeAnnotate(el) {319 function closeAnnotate(el) {
314 var form = el.closest('.annotate-form');320 var form = el.closest('.annotate-form');
315 form.classList.add('hidden');321 form.classList.add('hidden');