去除csdn中左栏和右下角的百度推广

去除csdn中左栏和右下角的百度推广广告

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         去除csdn中左栏和右下角的百度推广
// @namespace    http://tampermonkey.net/
// @version      0.2
// @description  去除csdn中左栏和右下角的百度推广广告
// @author       ljj([email protected])
// @match        https://www.baidu.com/s?*
// @match        https://m.baidu.com/*
// @match        https://blog.csdn.net/*
// @match        http://aoyouzi.iteye.com/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    var filter = $("iframe");
    for (var i = 0; i < filter.length; i++) {
        var src = $(filter[i]).attr("src");
        if (src != null && src.indexOf("pos.baidu.com") > 0) {
            filter[i].remove();
            //console.log(i);
            // console.log($(filter[i]).parent().parent());
            // $(filter[i]).parent().parent().remove();
        }
    }


    //删除底部的csnd登陆框框
    //console.log( $(".pulllog-box"));
    $(".pulllog-box").remove();
    // Your code here...
})();