您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
download csdn page clearly!
当前为
- // ==UserScript==
- // @name CSDN tools
- // @namespace http://tampermonkey.net/
- // @version 1.0.2
- // @description download csdn page clearly!
- // @author youguess
- // @include *://blog.csdn.net/*
- // @include *://www.cnblogs.com/*
- // @icon https://img-home.csdnimg.cn/images/20201124032511.png
- // @grant none
- // @license Apache-2.0
- // ==/UserScript==
- var download = (function () {
- 'use strict';
- // Your code here...、
- // get url to identify the page
- let url = window.location.href;
- // alert(url);
- function removeElementsForCSDN() {
- $("#side").remove();
- $("#comment_title, #comment_list, #comment_bar, #comment_form, .announce, #ad_cen, #ad_bot").remove();
- $(".nav_top_2011, #header, #navigator").remove();
- $(".p4course_target, .comment-box, .recommend-box, #csdn-toolbar, #tool-box").remove();
- $("aside").remove();
- $(".tool-box").remove();
- $("#toolBarBox").remove();
- $("main").css('display', 'content');
- $("main").css('float', 'left');
- $(".option-box").remove();
- $("body").css('min-width', 0);
- $(".option-box").remove();
- $("#copyright-box").remove();
- $("#blogExtensionBox").remove();
- $("#toolbarBox").remove();
- var right_content = document.getElementById("rightAsideConcision");
- if (right_content != null && right_content.length > 0) {
- right_content.remove();
- }
- var main_content = document.getElementsByClassName("blog-content-box");
- if (main_content.length > 0) {
- main_content[0].style.margin = "0 auto";
- main_content[0].style.maxWidth = "1000px";
- }
- //Auto expand the code of the article
- var code_expand_buttons = document.querySelectorAll(".look-more-preCode");
- if (code_expand_buttons != null && code_expand_buttons.length > 0) {
- code_expand_buttons.forEach(function (button) {
- button.click();
- })
- }
- }
- function removeElementsForCnblogs() {
- $("#navigator").remove();
- $("#cnblogs_ch").remove();
- $("#under_post_card2").remove();
- $("#under_post_card1").remove();
- $(".esa-catalog-contents").remove();
- $(".aplayer-body, #ap").remove();
- $("#scrollInfo").remove();
- $("#footer").remove();
- $(".login_tips").remove();
- $("#blog_c1").remove();
- $("#blog_post_info").remove();
- $(".postDesc").remove();
- $("#blog_post_info_block").remove();
- }
- if (url.match("/.*?csdn\.net*?/")) {
- // alert("csdn");
- window.onload = removeElementsForCSDN();
- }
- if (url.match("/.*?cnblogs.*?/")) {
- // alert("cnblogs");
- window.onload = removeElementsForCnblogs();
- }
- })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址