فهرست منبع

Minor JavaScript

Alexandre Alapetite 11 سال پیش
والد
کامیت
6e6d7b3c87
2فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 1 1
      p/scripts/main.js
  2. 1 1
      p/scripts/shortcut.js

+ 1 - 1
p/scripts/main.js

@@ -33,7 +33,7 @@ function needsScroll($elem) {
 }
 
 function str2int(str) {
-	if (str == '' || str === undefined) {
+	if (!str) {
 		return 0;
 	}
 	return parseInt(str.replace(/\D/g, ''), 10) || 0;

+ 1 - 1
p/scripts/shortcut.js

@@ -43,7 +43,7 @@ shortcut = {
 			//Find Which key is pressed
 			if (e.keyCode) code = e.keyCode;
 			else if (e.which) code = e.which;
-			if(  code == 32 ||  (code >= 48 && code <= 90) ||  (code >= 96 && code <= 111) ||  (code >= 186 && code <= 192) ||  (code >= 219 && code <= 222)) {
+			if (code == 32 || (code >= 48 && code <= 90) || (code >= 96 && code <= 111) || (code >= 186 && code <= 192) || (code >= 219 && code <= 222)) {	//FreshRSS
 				var character = String.fromCharCode(code).toLowerCase();
 			}