optimizing web pages for printing. However, time is ticking, but there are not many websites to ...">
📜 ⬆️ ⬇️

Printliminator - bookmarklet for easy printing sites

Not once on Habré there was a question about media "> optimizing web pages for printing. However, time is ticking, but there are not many websites to print a separate style. And I don’t always have to print the whole page, for example, I’m interested article, but absolutely not interesting comments under it, what do I print everything, and then just throw away the extra sheets in the trash.

Chris Coyier, author of the CSS-Tricks blog, was also puzzled by the same question. He wanted to print the lyrics of the song, but he didn’t want to print all banners, logos, background images and other garbage. Then he sat down and wrote a small jQuery script, which later turned into the hero of Habratopik, the bookmarklet “Printliminator”.

To use the bookmarklet it must be installed. Drag a large black button from The Printliminator website to the bookmarks bar of any browser that supports JavaScript in bookmarks. And then on the website that we want to print, click on the bookmark.

This window will appear:
Printliminator window
')
If you hover the mouse over any element of the page - it is framed in red. Clicking it will register the property {display: none} and the element will disappear from the page. If you hold down Alt (PC) or Option (Mac), everything will be deleted except for the framed element.

The “Remove all graphics” button will remove all the images from the site, and the “Apply print stylesheet” button will assign the website a pre-written style sheet for printing. As Chris himself writes, this style sheet is based on the Hartija CSS framework .

Well, there are still two buttons, the purpose of which, I think, is clear to everyone - “Undo last action” (undo the last action) and “Send to printer” (will cause the standard printer dialog).

For greater clarity, I recommend to watch the video on the site Printliminator . It is in English, but there and without words everything is clear.

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


All Articles