Skip to content

Instantly share code, notes, and snippets.

@Harold2017
Last active April 24, 2021 10:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Harold2017/da1138dfe082307da615226548204cf1 to your computer and use it in GitHub Desktop.
Save Harold2017/da1138dfe082307da615226548204cf1 to your computer and use it in GitHub Desktop.
print csdn blog
(function(){
$("#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").remove();
    $("aside").remove();
    $(".tool-box").remove();
    $("main").css('display','content');
    $("main").css('float','left');
    $("#mainBox").css('width','1000px');
    $("#mainBox").css('margin-left','0px');
    $("#mainBox").css('margin-right','0px');
    $(".main_father.clearfix.d-flex.justify-content-center").css("width","1000px");
    window.print();
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment