summaryrefslogtreecommitdiff
path: root/static/js/pages/frontpage_refresh.js
diff options
context:
space:
mode:
authoryo momma <shutup@oops.wtf>2026-02-03 02:19:19 +0000
committeryo momma <shutup@oops.wtf>2026-02-03 02:19:19 +0000
commit8004c1fc7957397577f51a409ec2c504c81d7e85 (patch)
tree299f62c7512e45d491dc282784031a770f04abad /static/js/pages/frontpage_refresh.js
parentc69b6626358052f175543cad0daa3f4aa54046b8 (diff)
Refactor main pages: extract inline JS
Diffstat (limited to 'static/js/pages/frontpage_refresh.js')
-rw-r--r--static/js/pages/frontpage_refresh.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/static/js/pages/frontpage_refresh.js b/static/js/pages/frontpage_refresh.js
new file mode 100644
index 0000000..aa31cc2
--- /dev/null
+++ b/static/js/pages/frontpage_refresh.js
@@ -0,0 +1,11 @@
+// Frontpage-only helper.
+// The legacy frontpage HTML calls `refreshing()` via <body onload="refreshing()">.
+
+if (typeof window.refreshing !== 'function') {
+ window.refreshing = function refreshing() {
+ var el = document.getElementsByName('posts')[0];
+ if (el) { el.src = el.src; }
+ setTimeout(refreshing, 300000);
+ };
+}
+