CSDN网页文章直接漂亮打印

1.浏览器右键检查或者审查或者按F12(笔记本考虑到加组合键Fn+F12或开启F区域锁)
2.点Console出现命令行界面
3.复制下方代码至命令行,回车即可。等待片刻,选择双面打印

(function(){ 'use strict'; var articleBox = $("div.article_content"); articleBox.removeAttr("style"); $("#btn-readmore").parent().remove(); $("#side").remove(); $("#comment_title, #comment_list, #comment_bar, #comment_form, .announce, #ad_cen, #ad_bot").remove(); $(".nav_top_2011, #header, #navigator").remove(); $(".csdn-side-toolbar,.template-box,.reward-user-box").remove(); $(".p4course_target, .comment-box, .recommend-box, #csdn-toolbar, #tool-box,#dmp_ad_58, .more-toolbox, .article-info-box, .btn-readmore").remove(); $("aside").remove(); $(".tool-box").remove(); $("main").css('display','content'); $("main").css('float','left'); $("#mainBox").css('width','100%'); $(".main_father.clearfix.d-flex.justify-content-center").css("width","100%"); window.print(); })();

你可能感兴趣的:(CSDN网页文章直接漂亮打印)