支持直接打开链接

master
IoTcat 5 years ago
parent 08bf5a1756
commit b9df77d46c
  1. 12
      server/cn/home/www/HomePage/index.html

@ -28,10 +28,14 @@ var ice_hk = 0;
return;
}
log_search("google", search_txt);
if(search_txt.substr(0,2) == "//"){
window.open("https:"+search_txt);
}else{
var search_url = "https://www.google.com/search?newwindow=1&hl=zh-CN&q=" + encodeURI(search_txt);
window.open(search_url);
}
}
}
//LISTEN ENTER KEYDOWN EVENT
document.onkeydown = function(e){
@ -96,9 +100,13 @@ var ice_hk = 0;
return;
}
log_search("baidu", search_txt);
if(search_txt.substr(0,2) == "//"){
window.open("https:"+search_txt);
}else{
var search_url = "https://www.baidu.com/s?wd=" + encodeURI(search_txt);
window.open(search_url);
}
}
function do_google_search() {
var search_txt = document.getElementById("search-bar-input").value;
if (search_txt == "") {
@ -106,9 +114,13 @@ var ice_hk = 0;
return;
}
log_search("google", search_txt);
if(search_txt.substr(0,2) == "//"){
window.open("https:"+search_txt);
}else{
var search_url = "https://www.google.com/search?newwindow=1&hl=zh-CN&q=" + encodeURI(search_txt);
window.open(search_url);
}
}
function log_search(type, val){

Loading…
Cancel
Save