📜 ⬆️ ⬇️

Printing articles from Habrahabr

Trying to print an article from Habr, but it does not print? While the creators of Habr are repairing their styles, you can use mine, available in the form of a bookmarklet, a style for Stylish or in its original form.

He removes all that is not necessary, repairs text breaks on another sheet, reduces large elements, adds links to the address.
He does not print comments. If necessary, it will be.
He does not print a headline. The browser usually does this.
It is unknown how it works in Internet Explorer. Switch to another browser.

Since the Habra parser is very strict, I can’t (or can’t) put a bookmarklet in any form. There are two solutions:
  1. Drag it to your bookmarks bar from my site .
  2. Create a new bookmark and enter this bandura in the “address” field:
     javascript:function addCss(z){var s=document.createElement('style');s.type = 'text/css';if(s.styleSheet){s.styleSheet.cssText=z;}else{s.appendChild(document.createTextNode(z));}document.getElementsByTagName('head')[0].appendChild(s);}addCss('*{background:white!important;color:black!important;overflow:visible!important;max-width:8.2in}h1,h2,h3,h4,h5,h6{page-break-after:avoid}pre,code,samp{white-space:pre-wrap;page-break-inside:avoid}ul,ol,li{page-break-inside:avoid}table table,tr,td{page-break-before:avoid;page-break-after:avoid}body>a,#header-wrapper,#header,#footer,#sidebar,.page-navigation,#comments,.entry-title .blog,.tags,.entry-info,.entry-title{display:none!important}.content{width:8.2in!important;margin:0!important;padding:0!important;float:none!important;color:black;font-size:12pt!important;line-height:120%!important;font-family:Georgia,serif!important}a{text-decoration:none!important;color:black!important}.content a:link:after,.content a:visited:after{content:" (" attr(href) ")";font-size:90%}'); 


For discussion, the code is posted here:
 * { background: white !important; color: black !important; overflow: visible !important; max-width: 8.2in; } h1,h2,h3,h4,h5,h6 { page-break-after: avoid } pre,code,samp { white-space: pre-wrap; page-break-inside: avoid } ul, ol, li { page-break-inside: avoid; } table table,tr,td { page-break-before: avoid; page-break-after: avoid } body > a, #header-wrapper, #header, #footer, #sidebar, .page-navigation, #comments, .entry-title .blog, .tags, .entry-info, .entry-title { display: none !important } .content { width: 8.2in !important; margin: 0 !important; padding: 0 !important; float: none !important; color: black; font-size: 12pt !important; line-height: 120% !important; font-family: Georgia, serif !important } a { text-decoration: none !important; color: black !important } .content a:link:after, .content a:visited:after { content: " (" attr(href) ")"; font-size: 90% } 

I am waiting for positive comments and grammar corrections. ^ _ ^

')

Source: https://habr.com/ru/post/38236/


All Articles