|
阅读:2869回复:4
能否帮忙修改一下这个搜索引擎的去除重定向脚本(已解决)
http://www.dogpile.com/
算是一个聚合搜索引擎,属于infospace旗下 搜索后点击结果要跳转 http://cs.dogpile.com/ClickHandler.ashx?ru= 这样的一串地址,想去除这个重定向功能,直接打开真实地址 通过论坛的朋友帮助,已经解决了,谢谢,脚本如下,同时适用于dogpile.com和mamma.com // ==UserScript==
// @id remove_infospace_redirection
// @name Remove Infospace Redirection
// @version 0.1
// @namespace http://kodango.me
// @author tuantuan <dangoakachan@foxmail.com>
// @description Remove URL redirection in the search results.
// @include http://www.mamma.com/result.php?*
// @include http://www.dogpile.com/search/web?*
// @run-at document-end
// ==/UserScript==
(function () {
function do_remove(alink) {
var rredirect = /ClickHandler\.ashx\?[dr]u=([^&]*)/i;
var url = alink.href;
if (!rredirect.test(url))
return;
alink.href = decodeURIComponent(url.match(rredirect)[1]);
}
function remove_redirection() {
var allLinks = document.links;
for (var i = 0, len = allLinks.length; i < len; i++)
do_remove(allLinks[i]);
}
document.addEventListener('DOMContentLoaded', remove_redirection, false);
})(); |
|
|
1楼#
发布于:2012-03-29 22:52
Re: 能否帮忙写一下这个搜索引擎的去除重定向脚本
同求此脚本,跟楼主遭遇到同样的问题 |
|
|
|
2楼#
发布于:2012-03-29 22:52
Re: 能否帮忙写一下这个搜索引擎的去除重定向脚本
再顶一下 |
|
|
3楼#
发布于:2012-03-29 22:52
|
|
|
4楼#
发布于:2012-03-29 22:52
Re: 能否帮忙修改一下这个搜索引擎的去除重定向脚本
已经在Mozest回复你。 |
|