ykm_csdn_01

去除csdn 不喜欢的模块

Stan na 11-09-2022. Zobacz najnowsza wersja.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name         ykm_csdn_01
// @namespace    https://github.com/LZHaini/test
// @version      0.1
// @description  去除csdn 不喜欢的模块
// @author       ykm
// @match        https://blog.csdn.net/*/article/details/*
// @grant        GM_addStyle
// @license MIT
// @run-at document-end
// ==/UserScript==

(function() {
    'use strict';

    GM_addStyle(`
   body{
   background:url('https://pc-index-skin.cdn.bcebos.com/1988b5343107c2fc5c130e54bebe5c47.jpg') no-repeat;
   background-repeat: no-repeat;
   background-attachment: fixed;
   background-position: center;
    }
    .programmer1Box{
        display:none;
    }
    #kp_box_479{
        display:none;
    }
    .toolbar-container-right{
        display:none;
    }
    .template-box{
        display:none;
    }
    #asideNewComments{
        display:none;
    }
    ` )
    var elem0 = document.getElementsByClassName('data-info d-flex item-tiling');
    elem0[0].parentNode.removeChild(elem0[0]);
    var elem1 = document.getElementsByClassName('aside-box-footer');
    elem1[0].parentNode.removeChild(elem1[0]);
    var elem2 = document.getElementsByClassName('aside-box common-nps-box');
    elem2[0].parentNode.removeChild(elem2[0]);
    var elem3 = document.getElementsByClassName('archive-box');
    elem3[0].parentNode.removeChild(elem3[0]);
    var _li = document.getElementById('recommendNps');
    _li.parentNode.removeChild(_li);
    var elem4 = document.getElementsByClassName('csdn-side-toolbar');
    elem4[0].parentNode.removeChild(elem4[0]);

})();