From d4afd008ad0a44a0899c8ec4dfd7ed9feadb2e38 Mon Sep 17 00:00:00 2001 From: zouap Date: Thu, 3 Mar 2022 11:50:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- public/home/search.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/public/home/search.js b/public/home/search.js index a590384a5..116dbf607 100644 --- a/public/home/search.js +++ b/public/home/search.js @@ -473,7 +473,7 @@ function displayRepoResult(page,jsonResult,onlyReturnNum,keyword){ } html +=" "; html +="

"; - html +=" " + recordMap["num_stars"] + "" + recordMap["num_forks"]; + html +=" " +recordMap["num_watches"] + "" + recordMap["num_stars"] + "" + recordMap["num_forks"]; html +=" 最后更新于 " + getTime(recordMap["updated_unix"],currentTime) +""; if(!isEmpty(recordMap["lang"])){ html +=" " + recordMap["lang"] + ""; @@ -641,6 +641,14 @@ function page(current){ }); } +$('#keyword_input').on('keypress',function(event){ + if(event.keyCode == 13){ + var keyword = $('#keyword_input').val(); + if(!isEmpty(keyword)){ + search(); + } + } +}); document.onreadystatechange = function() { if (document.readyState === "complete") {