I'm a chinese internet user. Google/Yahoo search engines are very unstable in my country.
When I click a yahoo search result link, I often get this error page:
ERROR
The requested URL could not be retrieved
While trying to retrieve the URL: http://search.yahoo.com/r/_ylt=A0oGdUY7FbNQFQsA5rZXNyoA;_ylu=X3oDMTE0ODJ2YTduBHNlYwNzcgRwb3MDMQRjb2xvA3NrMQR2dGlkA1ZJUDA1MV83Ng--/SIG=11ac0sa5q/EXP=1353942459/**http%3a//www.google.com/
The following error was encountered:
Access Denied.
Access control configuration prevents your request from being allowed at this time. Please contact your service provider if you feel this is incorrect.
Your cache administrator is noc_admin@163.com.
by DXT-GZ-APP02
I notice that yahoo will change the value of href
to dirtyhref
automatically when I click a link.
I try to $('a[id|=link]').unbind('click mousedown')
, but it doesn't work.
How to stop yahoo doing it?
Currently, I use this firefox greasemonkey code:
// ==UserScript==
// @name Clean URL
// @namespace http://hjkl.me
// @include https://www.google.com/search*
// @include http://search.yahoo.com/search*
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js
// @version 1
// ==/UserScript==
// GOOGLE
$('h3.r>a').removeAttr('onmousedown');
// YAHOO
$('a[id|=link]').on('click', function(){
var url = $(this).attr('dirtyhref').split('**')[1];
url = decodeURIComponent(url);
$(this).attr('href', url); //<-- yahoo will change it back!
window.open(url, '_blank');
return false;
});
The problem is: I cannot use the middle-mouse-click function. (Open tabpage silently)