orbit-basic/public/desktop_widgets/googlesearch/googlesearch.js

10 lines
281 B
JavaScript

var search = function(){
$("#search").submit(function(){
var val=$("#googlesearch").val();
if(val=="") return false;
val.replace(" ", "+");
//replace the zh-tw to something
window.open("https://www.google.com.tw/#hl="+o.currentLanguage+"&q="+val);
return false;
});
}