// ==UserScript== // @name remove the jump link in BAIDU // @author burningall // @description 去除百度搜索跳转链接 // @version 2015.8.23.2.0 // @include *www.baidu.com* // @grant GM_xmlhttpRequest // @run-at document-start // @compatible chrome 完美运行 // @compatible firefox 完美运行 // @license The MIT License (MIT); http://opensource.org/licenses/MIT // @supportURL http://www.burningall.com // @contributionURL troy450409405@gmail.com|alipay.com // @namespace https://greasyfork.org/zh-CN/users/3400-axetroy // @downloadURL none // ==/UserScript== (function(document){ //=====配置参数====== var config = { macthRules: 'a[href*="www.baidu.com/link?url"]:not([transcoding]):not([transcoded])',//需要跳转的链接 reloadRules: 'a[transcoded*="false"]',//请求失败,需要再次请求的链接 isAnimate: true,//是否需要动画 hasOb: true//判断是否已监听 }; //匹配正则 var regRules = { isJumpLink : /www.baidu.com\/link\?url=/ig, sliceResponse : { step1 : /.*window\.location\.replace\(\"(.*)\"\).*$/img, step2 : /^(.*)(