Greasy Fork is available in English.

移除百家家号搜索结果

删除百度搜索结果的百家号结果

Tính đến 06-12-2018. Xem phiên bản mới nhất.

// ==UserScript==
// @name         移除百家家号搜索结果
// @namespace    http://tampermonkey.net/
// @home-url     https://greasyfork.org/zh-CN/scripts/371691
// @description  删除百度搜索结果的百家号结果
// @version      0.10
// @include      http://www.baidu.com/*
// @include      https://www.baidu.com/*
// @require      http://code.jquery.com/jquery-1.8.2.js
// @author       mzcc
// @run-at       document-end
// ==/UserScript==

(function() {
    'use strict';

    $(document).on('DOMSubtreeModified', process);

    function process() {

        $('.source-icon').parents('.c-row').remove();
        $('.c-showurl').each(function(i, v){
            let html = $(this).html();
            if(html.indexOf('baijia') > -1){
                $(this).parents('.c-container').remove();
            }
        });

        let $topOp = $('.c-offset');
        if(!$topOp.find('.c-row').length){
            $topOp.parent().remove();
        }

        let $video = $('.op-short-video-pc');
        if($video.length){
            $video.parent().remove();
        }
    }
})();