Skip to content

Instantly share code, notes, and snippets.

@traderbagel
Last active October 10, 2020 05:34
Show Gist options
  • Save traderbagel/8ec2ea07e2ac4e22bf0e8d27e9c206b0 to your computer and use it in GitHub Desktop.
Save traderbagel/8ec2ea07e2ac4e22bf0e8d27e9c206b0 to your computer and use it in GitHub Desktop.
CSDN Blog Article to PDF
// run in chrome console
(function(){
$("#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');
$(".recommend-right").remove()
$("body").css('min-width',0);
$(".option-box").remove();
$(".justify-content-center")[0].classList.remove("justify-content-center")
window.print();
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment