CSDN博客专用

CSDN博客网站专用 自动展开+去除页面右侧广告

目前为 2018-09-21 提交的版本。查看 最新版本

// ==UserScript==
// @name         CSDN博客专用
// @namespace    [email protected]
// @version      1.0.0
// @description  CSDN博客网站专用 自动展开+去除页面右侧广告
// @author       zhaoxiufei
// @match        *://blog.csdn.net/*
// @run-at       document-end
// ==/UserScript==
(function() {
    'use strict';
    var isdebug = true;
    var logger = isdebug ? console.log.bind(console) : function() {};

    //自动展开
    var doc = document.getElementById("btn-readmore");;
    if (doc) {
        logger("自动展开");
        doc.click();
    }
    //去除博客右侧动态添加的广告
    var interval = setInterval(ad, 200);
    var timeSrun = 0;
    function ad() {
        var xx = $(".recommend-fixed-box");
        var yy = xx.children("div");
        for (var i = 0; i < yy.length; i++) {
            timeSrun += 1;
            yy[i].remove();
            if (timeSrun == 10) {
                clearInterval(interval);
            }
        }
    }
})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址