git » git-arr » commit bedab61

git-arr.js: Auto-format

author Alberto Bertogli
2025-07-19 10:31:37 UTC
committer Alberto Bertogli
2025-07-19 10:31:37 UTC
parent 15d909a3db83e1900b8ad129582853d1310eefc2

git-arr.js: Auto-format

This patch uses js-beautify to auto-format git-arr.js, to make it easier
to maintain a uniform style.

static/git-arr.js +17 -17

diff --git a/static/git-arr.js b/static/git-arr.js
index 0533dc0..110f3d5 100644
--- a/static/git-arr.js
+++ b/static/git-arr.js
@@ -10,28 +10,28 @@ function how_long_ago(timestamp) {
     if (timestamp < 0)
         return "never";
 
-	var seconds = Math.floor(now() - timestamp);
+    var seconds = Math.floor(now() - timestamp);
 
-	var interval = Math.floor(seconds / (365 * 24 * 60 * 60));
-	if (interval > 1)
-		return interval + " years ago";
+    var interval = Math.floor(seconds / (365 * 24 * 60 * 60));
+    if (interval > 1)
+        return interval + " years ago";
 
-	interval = Math.floor(seconds / (30 * 24 * 60 * 60));
-	if (interval > 1)
-		return interval + " months ago";
+    interval = Math.floor(seconds / (30 * 24 * 60 * 60));
+    if (interval > 1)
+        return interval + " months ago";
 
-	interval = Math.floor(seconds / (24 * 60 * 60));
+    interval = Math.floor(seconds / (24 * 60 * 60));
 
-	if (interval > 1)
-		return interval + " days ago";
-	interval = Math.floor(seconds / (60 * 60));
+    if (interval > 1)
+        return interval + " days ago";
+    interval = Math.floor(seconds / (60 * 60));
 
-	if (interval > 1)
-		return interval + " hours ago";
+    if (interval > 1)
+        return interval + " hours ago";
 
-	interval = Math.floor(seconds / 60);
-	if (interval > 1)
-		return interval + " minutes ago";
+    interval = Math.floor(seconds / 60);
+    if (interval > 1)
+        return interval + " minutes ago";
 
     if (seconds > 1)
         return Math.floor(seconds) + " seconds ago";
@@ -52,7 +52,7 @@ async function load_timestamps() {
     console.log("Loaded timestamps:", json);
 
     for (const [repo_name, timestamp] of Object.entries(json)) {
-        const e = document.getElementById("age:"+repo_name);
+        const e = document.getElementById("age:" + repo_name);
         if (!e) {
             console.warn(`No element found for repo: ${repo_name}`);
             continue;