Nathaniel van Diepen 11 anni fa
parent
commit
f4c46cc21a
1 ha cambiato i file con 19 aggiunte e 17 eliminazioni
  1. 19 17
      app/www/js/omnomirc.js

+ 19 - 17
app/www/js/omnomirc.js

@@ -205,24 +205,26 @@
 			if(settings.timestamp == 'fuzzy'){
 				$(selector).timeago();
 			}else{
-				var timestamp = settings.timestamp,
-					i,
-					text='',
-					date = new Date($(selector).attr('title'));
-				if(timestamp == 'exact'){
-					timestamp = 'H:m:s t';
-				}
-				for(i=0;i<timestamp.length;i++){
-					switch(timestamp[i]){
-						case 'H':text+=((date.getHours()+11)%12)+1;break;
-						case 'h':text+=date.getHours();break;
-						case 'm':text+=date.getMinutes();break;
-						case 's':text+=date.getSeconds();break;
-						case 't':text+=(date.getHours()>11)?'pm':'am';break;
-						default:text+=timestamp[i];
+				$(selector).each(function(){
+					var timestamp = settings.timestamp,
+						i,
+						text='',
+						date = new Date($(this).attr('title'));
+					if(timestamp == 'exact'){
+						timestamp = 'H:m:s t';
 					}
-				}
-				$(selector).text(text);
+					for(i=0;i<timestamp.length;i++){
+						switch(timestamp[i]){
+							case 'H':text+=((date.getHours()+11)%12)+1;break;
+							case 'h':text+=date.getHours();break;
+							case 'm':text+=date.getMinutes();break;
+							case 's':text+=date.getSeconds();break;
+							case 't':text+=(date.getHours()>11)?'pm':'am';break;
+							default:text+=timestamp[i];
+						}
+					}
+					$(selector).text(text);
+				});
 			}
 		},
 		socket,$i,$s,$h,$cl,$tl,hht;