CSDN-Clean-Reading

CSDN顶栏、侧栏、推荐、统统删除!!解锁复制!!

01.07.2023 itibariyledir. En son verisyonu görün.

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

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.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name         CSDN-Clean-Reading
// @namespace    https://dshboom.top
// @version      1.2
// @description  CSDN顶栏、侧栏、推荐、统统删除!!解锁复制!!
// @author       dshboom
// @match        https://*.csdn.net/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';


    document.addEventListener('copy', function(e) {
        e.stopPropagation();
    }, true);
    // 隐藏顶栏
    var topBar = document.getElementById('csdn-toolbar');
    if (topBar) {
        topBar.style.display = 'none';
    }
    // 推荐询问
    var divElement = document.getElementById('asideNewNps');
    if (divElement) {
        divElement.parentNode.removeChild(divElement);
    }
    divElement = document.getElementById('recommendNps');
    // 将其从DOM树中删除
    if (divElement) {
        divElement.parentNode.removeChild(divElement);
    }
    divElement = document.querySelector('.toolbox-middle');
    // 如果找到了该div元素,将其隐藏
    if (divElement) {
        divElement.style.display = 'none';
    }
    // 隐藏右侧边栏
    var rightSidebar = document.querySelector('.main-container .right-box');
    if (rightSidebar) {
        rightSidebar.style.display = 'none';
    }
    var bottomBar = document.querySelector('.left-toolbox');
    bottomBar.style.display = 'none';
    document.designMode = 'on';
})();