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") {