// ==UserScript== // @name remove the jump link in BAIDU // @author burningall // @description 去除百度搜索跳转链接 // @version 2015.8.23 // @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 macthList = [ { hostname:'www.baidu.com', rule:'a[href*="www.baidu.com/link?url"]:not([transcoding]):not([transcoded])' }, { hostname:'www.google.com', rule:'' } ]; function getRules(){ for(var i=0;i h || pos.bottom < 0 || pos.left > w || pos.right < 0; if (jugg === true) { //不可视 return false; } else { //可视 return true; } } } function transcode(urlLink,a,secFn){ if( a.getAttribute("transcoded")=="true" ){ return; } a.setAttribute("transcoding","true"); GM_xmlhttpRequest({ method: "GET", url: urlLink, onreadystatechange:function( response ){ if(response.readyState==4){ var status = response.status+''; if( status.charAt(0)=="4" || status.charAt(0)=="5" ){//4XX,5XX错误 console.log( response.status ); a.removeAttribute("transcoding"); a.setAttribute("transcoded","false"); }else{ var reg1 = /.*window\.location\.replace\(\"(.*)\"\).*$/img; var reg2 = /^(.*)(