diff options
| author | yo momma <shutup@oops.wtf> | 2026-02-03 02:19:19 +0000 |
|---|---|---|
| committer | yo momma <shutup@oops.wtf> | 2026-02-03 02:19:19 +0000 |
| commit | 8004c1fc7957397577f51a409ec2c504c81d7e85 (patch) | |
| tree | 299f62c7512e45d491dc282784031a770f04abad /static/js/pages/frontpage_refresh.js | |
| parent | c69b6626358052f175543cad0daa3f4aa54046b8 (diff) | |
Refactor main pages: extract inline JS
Diffstat (limited to 'static/js/pages/frontpage_refresh.js')
| -rw-r--r-- | static/js/pages/frontpage_refresh.js | 11 |
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); + }; +} + |
