Created
February 11, 2017 07:10
-
-
Save jeasonstudio/5f0bb7b37bbcba434828a3028f5e086b to your computer and use it in GitHub Desktop.
百度搜索 油猴插件监本
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name baidu | |
// @namespace http://jeasonstudio.cn/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @include http://www.baidu.com/* | |
// @grant none | |
// ==/UserScript== | |
function judgeAdd(idChar) { | |
var arr = idChar.split(""); | |
if ((arr[0] == '3' || arr[0] == '5') && arr.length == 4) { | |
return true; | |
} else { | |
return false; | |
} | |
} | |
(function() { | |
$("#content_right").fadeOut(1000); //右侧栏消失 | |
$(".head_nums_cont_inner").fadeOut(1000); //工具栏消失 | |
$(".f13").fadeOut(1000); //快照消失 | |
$(".result-op").css('border-left', '5px #3385ff solid'); //百度相关结果 | |
$(".result-op").css('padding-left', '18px'); //百度相关结果 | |
$(".result").css('border-left', '5px #008000 solid'); //百度相关结果 | |
$(".result").css('padding-left', '18px'); //百度相关结果 | |
$('.general_image_pic').remove(); //删普通图片 | |
$('.c-span6').remove(); //百度百科图片 | |
// $('.xpath-log').remove() //删百度图片 | |
$('a').css('text-decoration', 'none'); //a 链接无下划线 | |
$(".result .c-container").css('background-color', '# ddd'); //正常结果 | |
if ($("#content_left > div")[$("#content_left > div").length - 1].id === '') { | |
$($("#content_left > div")[$("#content_left > div").length - 1]).fadeOut(1000); | |
} | |
if ($("#content_left > div")[0].id === '') { | |
$($("#content_left > div")[0]).fadeOut(1000); | |
} | |
for (var i = 0; i < $("#content_left > div").length; i++) { | |
// console.log($("#content_left > div")[$("#content_left > div").length - 1].id === '') | |
// console.log(this) | |
if (judgeAdd(String($("#content_left > div")[i].id))) { | |
// $("#content_left > div")[i].style = "display: none;" | |
$($("#content_left > div")[i]).fadeOut(1000); | |
} | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment