1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107
   | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
  (function() {     'use strict';
      var $ = $ || window.$;     var CSDN_PRINT = 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');         $(".left-toolbox").remove();         $("#mainBox").removeClass();         $("#mainBox").parent().removeClass();         $('body').attr("style", "position: absolute;left: 0px;right: 0px;background-color: white")         $('main').attr("style", "position: absolute;left: 0px;right: 0px;margin-bottom: 0px");         $('main div.blog-content-box').attr("style", "padding-bottom: 0px");         $(".blog-footer-bottom").remove();                  window.print();     };
      var ZHIHU_PRINT = function (){         $(".ColumnPageHeader").remove();                  $(".Recommendations-Main").remove();         $(".Comments-container").remove();         $(".ContentItem-actions").parent().remove();         $(".Zi--BackToTop").remove();         window.print();     };
      var JIANSHU_PRINT = function(){         $("header").remove();         $("aside").remove();         $("footer, footer+div").remove();         $("#note-page-comment, section:gt(0), [role='button'], .ant-back-top, .anticon-caret-up").remove();         $("svg").remove();         $("section").attr("style", "position: absolute;left: 0px;right: 0px;margin-bottom: 0px");         $("article").nextAll().remove();         window.print();     };
      var SF_PRINT = function(){         $("#sf-header, #comment-area, footer, .text-center, #fixedTools").remove();         $("article").nextAll().remove();         $("div.row").children().eq(1).remove();         $("div.row > div > div").eq(0).nextAll().remove();         $("#sf-article_title h5").remove();         $("div.row").attr("style", "position: absolute;left: 0px;right: 0px;margin-bottom: 0px");         window.print();     };
 
      var domain = document.domain;     if(domain.endsWith('zhihu.com')){          $(".Post-Title").on('dblclick',function(e){             ZHIHU_PRINT();         });     }     else if(domain.endsWith('csdn.net')){          $("#articleContentId").on('dblclick',function(e){             CSDN_PRINT();         });     }     else if(domain.endsWith('jianshu.com')){          $("section > h1").on('dblclick', function(e){            JIANSHU_PRINT();         });     }     else if(domain.endsWith('segmentfault.com')){          var cont = $('<h5 style="display:inline"><button id="tm_print">打印</button></h5>');         $("#sf-article_title").append(cont);         $("#sf-article_title h5").on('click', function(e){            SF_PRINT();         });     }
  })();
 
  |