diff src/chat.js @ 88:7b339b1ccd11

add tools/users.html
author Franklin Schmidt <fschmidt@gmail.com>
date Thu, 13 Mar 2025 16:18:39 -0600
parents 83fb90276334
children 3053a4fc10be
line wrap: on
line diff
--- a/src/chat.js	Wed Mar 12 14:20:10 2025 -0600
+++ b/src/chat.js	Thu Mar 13 16:18:39 2025 -0600
@@ -353,35 +353,6 @@
 	reader.readAsArrayBuffer(file);
 }
 
-let times = [
-	{
-		time: 1000*60*60*24,
-		unit: 'day'
-	},
-	{
-		time: 1000*60*60,
-		unit: 'hour'
-	},
-	{
-		time: 1000*60,
-		unit: 'minute'
-	}
-];
-
-function ago(time) {
-	for( let t of times ) {
-		let n = Math.floor(time / t.time);
-		if( n > 0 ) {
-			let s = `${n} ${t.unit}`;
-			if( n > 1 )
-				s = s + 's';
-			return s + ' ago';
-		}
-	}
-	return 'just now';
-end
-}
-
 function openPeople() {
 	let dialog = document.querySelector('dialog[people]');
 	let spans = dialog.querySelectorAll('span[last_seen]');