aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--assets/js/index.js3
-rw-r--r--static/js/timeago.ts4
2 files changed, 7 insertions, 0 deletions
diff --git a/assets/js/index.js b/assets/js/index.js
index c5f8ba9..78fb432 100644
--- a/assets/js/index.js
+++ b/assets/js/index.js
@@ -684,6 +684,9 @@
}
};
const substitution = setInterval(date, 4);
+ self.addEventListener("scroll", function() {
+ date("viewport");
+ });
self.addEventListener("DOMContentLoaded", function() {
setTimeout(function() {
clearInterval(substitution);
diff --git a/static/js/timeago.ts b/static/js/timeago.ts
index 10206e3..edb3e9d 100644
--- a/static/js/timeago.ts
+++ b/static/js/timeago.ts
@@ -81,6 +81,10 @@
const substitution = setInterval(date, 4);
+ self.addEventListener("scroll", function () {
+ date("viewport");
+ });
+
self.addEventListener("DOMContentLoaded", function () {
setTimeout(function () {
clearInterval(substitution);