googleの検索結果にonmousedownでajax
googleの検索結果にonmousedownに入っているのだが、これが個人的に問題。
Safariだけみたいだが、アンカーを別ウィンドウにドラッグして開くことができない。マウスを押す(クリックではない)だけでページが開いてしまう。
検索結果部分の
<a href="http://dev.mysql.com/doc/mysql/ja/Using_mysqlcheck.html" onmousedown="return asq(event,this,'res','1','')">
asq functionは
function asq(event,el,ct,cd,sg){
if(window.XMLHttpRequest){
if(el.handledFirstTime){
el.handledFirstTime=false;
window.location=el.href;
return false;
}
el.handledFirstTime=true;
var x=new XMLHttpRequest();
x.open("GET","/url?sa=T&ct="+escape(ct)+"&cd="+escape(cd)+"&url="+escape(el.href).replace(/?+/g,"%2B")+"&ei=b_T2QpuxNJmasgH57biMDg"+sg,true);
var m=event.altKey||event.metaKey;
if(m){
x.onreadystatechange=function(){
if(x.readyState==4){
clearTimeout(timeoutid);
el.dispatchEvent(event);
}
};
var timeoutid=setTimeout(function(){
x.abort();
el.dispatchEvent(event);
},1000);
}
x.send(null);
return m;
}
return true;
}
クリックしたURLをajaxでgoogleに送っているのね。
なんか微妙。