Просмотр исходного кода

Deal with @. Should generalize to any non A-Z.

Zachary Kotlarek 11 лет назад
Родитель
Сommit
c27fc89650
1 измененных файлов с 4 добавлено и 4 удалено
  1. 4 4
      web/includes/header.php

+ 4 - 4
web/includes/header.php

@@ -42,11 +42,11 @@ $( document ).on( "mobileinit", function() {
 		if ( !text ) {
 			return null;
 		}
-		if ( !isNaN(parseFloat(text)) ) {
-			return "#";
+		var short = text.slice( 0, 1 ).toUpperCase();
+		if ( short == '@' || !isNaN(parseFloat(text)) ) {
+			return '#';
 		} else {
-			text = text.slice( 0, 1 ).toUpperCase();
-			return text;
+			return short;
 		}
 	};
 });