The Printliminator (Lean)

Activate, click to remove, Alt+Click (keep only this section), Shift+Click (make full width), BACKSPACE to undo, ESC to deactivate (keeps changes). Inspired by The Printliminator by CSS-Tricks.

Vous devrez installer une extension telle que Tampermonkey, Greasemonkey ou Violentmonkey pour installer ce script.

Vous devrez installer une extension telle que Tampermonkey pour installer ce script.

Vous devrez installer une extension telle que Tampermonkey ou Violentmonkey pour installer ce script.

Vous devrez installer une extension telle que Tampermonkey ou Userscripts pour installer ce script.

Vous devrez installer une extension telle que Tampermonkey pour installer ce script.

Vous devrez installer une extension de gestionnaire de script utilisateur pour installer ce script.

(J'ai déjà un gestionnaire de scripts utilisateur, laissez-moi l'installer !)

Vous devrez installer une extension telle que Stylus pour installer ce style.

Vous devrez installer une extension telle que Stylus pour installer ce style.

Vous devrez installer une extension telle que Stylus pour installer ce style.

Vous devrez installer une extension du gestionnaire de style pour utilisateur pour installer ce style.

Vous devrez installer une extension du gestionnaire de style pour utilisateur pour installer ce style.

Vous devrez installer une extension du gestionnaire de style pour utilisateur pour installer ce style.

(J'ai déjà un gestionnaire de style utilisateur, laissez-moi l'installer!)

Auteur
piknockyou
Installations quotidiennes
0
Installations (total)
1
Notes
0 0 0
Version
1.0
Créé
25/03/2026
Mis à jour
25/03/2026
Taille
18,6 ko
Licence
AGPL-3.0
S'applique à
Tous les sites

☕ If you find this tool helpful & would like to support its maintenance, please consider leaving a tip on:

https://ko-fi.com/piknockyou

Thank you! :-)


🖼 For a quick impression of this script, refer to the screenshots at the bottom.


The Printliminator (Lean)

Inspired by The Printliminator by Chris Coyier, Devon Govett, and Rob Garrison — originally a bookmarklet/extension from CSS-Tricks. This userscript is a lean reimplementation that works everywhere without CSP restrictions.

Interactively remove unwanted elements from any webpage before printing or screenshotting. Click to remove, Alt+Click to keep only a section, Shift+Click to make elements full-width. Fully undoable, zero dependencies, works on any site.

Why You Need This

Printing or screenshotting a webpage usually means dealing with:

  • Ads and sidebars — clutter that wastes ink and space
  • Navigation bars and footers — irrelevant chrome around the content you actually want
  • Cookie banners and popups — overlays that block the real content
  • Narrow content columns — articles trapped in a skinny container while the rest of the page is empty
  • No easy way to clean up — browser print dialogs offer little control over what gets included

The original Printliminator bookmarklet solved this beautifully, but bookmarklets are blocked by Content Security Policy on many modern sites. This userscript reimplementation runs via your userscript manager, bypassing CSP entirely — it works on every site, every time.

How It Works

  1. Activate the tool from your userscript manager menu
  2. Hover over any element — it highlights with a red border
  3. Click to remove it
  4. Print or screenshot when you're happy with the result
  5. Press Escape to deactivate (changes stay)

That's it. No configuration, no setup, no UI clutter.

Controls

Action What It Does
Click Remove the highlighted element
Alt + Click Keep only this section — hides everything else (siblings, headers, sidebars, etc.)
Shift + Click Toggle full viewport width on the element (useful for expanding narrow article columns)
Backspace Undo the last action
Escape Deactivate the tool (all changes remain on the page)

Visual Feedback

Highlight Meaning
🔴 Red border + glow Element will be removed on click
🔵 Blue border + glow Element is currently full-width (Shift+Click to toggle)

Key Features

Remove Anything

Click any element to instantly hide it — ads, banners, sidebars, images, headers, footers, social widgets, cookie notices. If you can hover over it, you can remove it.

Keep Only What Matters (Alt+Click)

Alt+Click on an article body or content section. The script walks up the DOM tree and hides all siblings at every level — effectively isolating just the section you clicked. Perfect for extracting a single article from a cluttered page.

Make It Full Width (Shift+Click)

Many sites constrain content to a narrow column. Shift+Click any element to force it to full viewport width, centered on the page. Click again to toggle it back. Combines naturally with Alt+Click — isolate a section, then expand it.

Unlimited Undo

Every action (remove, keep-only, full-width toggle) is recorded. Press Backspace to undo them one by one, in reverse order. No action is permanent until you close or navigate away from the page.

Non-Destructive

  • Changes are CSS-only (display: none, width overrides) — no DOM elements are actually deleted
  • Deactivating with Escape removes the tool's event listeners but keeps your changes so you can print
  • Refreshing the page restores everything to its original state

Zero UI Footprint

No floating buttons, no panels, no injected toolbars. The tool activates from your userscript manager menu and communicates entirely through cursor changes and border highlights.

Usage Workflow

For Printing

  1. Navigate to the page you want to print
  2. Activate The Printliminator from the userscript manager menu
  3. Click away ads, navigation, sidebars, footers
  4. Alt+Click the main content area to isolate it
  5. Shift+Click to expand it to full width if needed
  6. Press Escape to deactivate
  7. Ctrl+P to print — clean, focused output

For Screenshots

Same workflow as above, then use your OS screenshot tool or browser's built-in screenshot feature on the cleaned-up page.

For Reading

Just remove distracting elements as you go. The tool stays active until you press Escape, so you can clean up a page progressively while reading.

Differences from the Original

Original Printliminator This Userscript
Delivery Bookmarklet / Chrome extension Userscript (any manager)
CSP blocked? Yes, on many modern sites No — userscript manager bypasses CSP
Browser support Chrome, Opera (extension) Any browser with a userscript manager
Print stylesheet Included (Hartija-based) Not included (focused on element removal)
Graphics removal Bulk remove all images Per-element click removal
Full-width mode Not available Shift+Click to expand elements
Keep-only mode Not available Alt+Click to isolate sections
Undo Not available Backspace to undo any action

Technical Details

  • Pure CSS manipulation — uses classList.add/remove with !important rules
  • Capture-phase click handler — intercepts clicks before the page's own handlers, preventing link navigation and button actions while the tool is active
  • Smart element filtering — automatically ignores <script>, <style>, <meta>, <head>, <br>, <hr>, and already-hidden elements
  • Full-width uses viewport units100vw with translateX(-50%) centering, works regardless of parent container constraints
  • Stylesheet persists after deactivation — the injected <style> element stays so hidden/resized elements remain affected until page refresh
  • No external dependencies — entirely self-contained, no network requests
  • Minimal permissions — only requires GM.registerMenuCommand

Installation

  1. Install a userscript manager:
  2. Install this script
  3. Visit any page → activate from the userscript manager menu

Credits

This userscript is inspired by and pays tribute to The Printliminator — the original bookmarklet/extension project by:

The original project is available as a bookmarklet and Chrome extension. This userscript is a separate, lean reimplementation — not a fork — designed to work as a userscript on all sites including those with strict Content Security Policies where bookmarklets are blocked.

FAQ

Q: How do I activate it? A: Click your userscript manager icon (Violentmonkey/Tampermonkey) in the browser toolbar, then click "Activate The Printliminator" from the menu.

Q: How is this different from the original Printliminator? A: The original is a bookmarklet and Chrome/Opera extension by CSS-Tricks. This is a userscript reimplementation with added features (undo, keep-only, full-width) that works on all sites regardless of CSP restrictions. See the comparison table above.

Q: Can I undo everything at once? A: Press Backspace repeatedly to undo actions one by one. To restore everything instantly, just refresh the page.

Q: Do changes survive page navigation? A: No. Changes are CSS-only and exist only in the current page session. Navigating away or refreshing resets everything.

Q: Does it work on any website? A: Yes. It matches *://*/* and file:///*, so it works on any webpage and local HTML files.

Q: Why Escape instead of a close button? A: To keep the UI footprint at zero. No buttons, no panels — just keyboard shortcuts and mouse interactions.

Q: Can I use this with Page Saver? A: Yes! Clean up the page with The Printliminator, deactivate it (Escape), then save with Page Saver. The hidden elements won't appear in the saved file.

Q: What happens if I accidentally remove the wrong thing? A: Press Backspace to undo. Every single action is recorded and can be reversed in order.