Facebook Post & Comment Capture
Capture Facebook posts and comment threads as high-resolution images with smart auto-expansion, clean avatar rendering, and one-click copy/download.
About this script
A powerful visual capture userscript built by Nisay Tech. Directly integrates into Facebook's native three-dots (...) context menu and offers an optional post-header quick camera button. Automatically unrolls hidden comments, nested replies, and truncated 'See more' text with a live progress HUD and early 'Capture Now' stop. Inlines CDN avatars as base64 Data URLs via GM_xmlhttpRequest to completely eliminate CORS canvas tainting. Outputs a crisp Retina 2x PNG ready to download or copy directly to your clipboard.
Features
- Full Post Card Capture: Traverses up to the full post container (author header, avatar, video/image media, reaction counters, and comments).
- Feed Post Auto-Comments Opener: Automatically clicks 'Comment' / 'X comments' to reveal and hydrate the comment thread if hidden on feed posts.
- Video Frame Snapshot: Automatically renders the active video frame to canvas to prevent blank/black video media rectangles.
- Dual Visual & Data Export: One-click export to PNG (2x Retina), Excel-ready CSV (UTF-8 BOM), and structured JSON format.
- Adaptive Auto-Scroll Engine: Nudges scroll position to trigger Facebook's virtual lazy loading for deep comment threads.
- Auto Force 'All Comments': Automatically detects and switches comment sorting from 'Most relevant' / 'Newest' to 'All comments' (supports English & Khmer).
- Dedicated Auto-Expand Feature: Standalone 1-click button (⏬) & 3-dots menu item to auto-expand comments without taking a screenshot.
- Native Context Menu Hook: Injects 'Capture Post & Comments' and 'Auto-Expand All Comments' directly into Facebook's 3-dots (...) post menu.
- Quick Post Header Actions: Optional discrete camera (📷) and unroll (⏬) icons on post headers for instant 1-click execution.
- Synthetic Mouse Dispatch & Fast Click: Simulates full mouse sequence (mouseover/down/up/click) and scroll-into-view for 100% trigger reliability on React 18.
- Safety Action Guard: Strict safety filter preventing accidental clicks on like, share, send, block, or delete buttons.
- Live Progress HUD: Real-time floating overlay with cycle counters, 'Capture Now' early render, and safe exit.
- Zero CORS Canvas Tainting: Pre-converts profile avatars and media into base64 Data URLs via GM_xmlhttpRequest.
- 2x Retina High-DPI Output: Crystal clear text and media rendering powered by html2canvas.
- Theme Adaptive: Automatically matches Facebook's active Light or Dark interface palettes.
Installation Instructions
Install Extension
Install the official Tampermonkey extension for Chrome, Edge, Firefox, Brave, or Safari.
Click Install
Click the "Install Script" button in the sidebar of this page.
Confirm in Tampermonkey
Tampermonkey will open an inspection tab showing the script headers and permissions. Click Install.
Ready to Use
Navigate to or refresh the target website to activate the userscript automatically.
Changelog
- Restored Horizontal Comment Actions Bar: Removed disruptive display: block and 100% width overrides across comment articles, restoring the native horizontal layout of Like, Reply, timestamp, and reaction icons.
- Clean Natural Text Wrapping: Restricted text wrapping rules strictly to [dir='auto'] overflow boundaries without altering native flex action items or button stacking.
- Fixed Multiple Photos Collage Grid Style Corruption: Preserved native overflow clipping and flex-layout rules on collage grid cells, preventing images from blowing out of their grid tiles and overlapping the reactions bar.
- Removed Disruptive Image Dimension Overrides: Eliminated rigid min-width and min-height rules on img elements in favor of native object-fit and responsive grid proportions.
- Permanent Post Photo Capture Fix: Replaced fragile array index mapping with 1-to-1 tag-based tracking between live DOM and clone, guaranteeing high-res photo URLs are accurately identified regardless of DOM trimming.
- CORS-Bypass ArrayBuffer Fetching: Upgraded GM_xmlhttpRequest to use arraybuffer with chunked binary conversion and stripped Origin headers to prevent Facebook CDN CORS 403 blocks on high-resolution post photos.
- Media Container Dimension Locks: Enforced explicit height and width preservation on media wrappers to prevent photos and collage boxes from collapsing to blank or solid placeholder rectangles.
- Comment Multiline Block Separation: Partitioned multiline comments into independent block div elements before rendering, eliminating html2canvas inline line overlap and baseline collision.
- Fixed Multiline Comment Overlapping & Collision: Repositioned render container inside active viewport (top:0 behind page) so Chromium computes full text line boxes instead of collapsing them at -99999px.
- Enforced Block Layout on Text Lines: Applied display: block !important, clear: both, and vertical spacing to all comment line containers and <br> elements, preventing lines from rendering on top of each other.
- Zero Coordinate Skewing: Passed scrollX: 0, scrollY: 0, x: 0, y: 0 explicitly to html2canvas to eliminate scroll offset displacement.
- Fixed Comment Text Collision & Overlapping: Removed destructive universal pre-wrap and min-width rules that caused comment message text to render directly on top of author names, badges, and star emojis.
- Natural Flex & Spacing Restoration: Confined overflow-wrap: anywhere and word-break: break-word strictly to message block containers, allowing inline spans and badges to compute their natural line heights.
- Post Photo Extraction & Inlining: Mapped cloned images to live DOM currentSrc and parsed srcset to resolve real high-resolution photo URLs instead of 20x20 blurred LQIP or empty placeholders.
- CSS Background-Image Inlining: Automatically scans and pre-converts post photos and collage grids rendered via CSS background-image into base64 Data URLs via GM_xmlhttpRequest.
- Media Container Collapse Prevention: Prevented aggressive height: auto unclamping on photo wrappers and media containers, preserving calculated dimensions so post photos never collapse to 0px.
- Resilient Image Fetching: Added Facebook Referer & Origin request headers, extended timeout to 25s for large post photos, and added fallback to browser-cached fetch.
- Standalone Auto-Expand Mode: Added dedicated 1-click post-header button (⏬) and 3-dots context menu command to auto-expand comments in-place without capturing.
- Enhanced Text Wrapping: Eliminated flex-shrink restrictions and enforced overflow-wrap: anywhere and word-break: break-word across all comment and text containers for flawless Khmer and English wrapping.
- Complete Grey Scrollbar & Footer Bar Removal: Suppressed faux scrollbar painting and cleanly severed trailing composer footer bars below the final comment.
- Top Comment Sticker Re-Hydration: Automatically scrolls comments container back to top before cloning so top comment stickers are fully mounted by React.
- Zero Left-Edge Text Artifacts: Eliminates 1px visually-hidden accessibility text spillage along the left card margin.
- Bottom Composer Cleanup: Completely strips the active user avatar and sticky composer wrapper from the bottom of dialog snapshots.
- Dynamic Computed Style Unclamping: Programmatically detects and unclamps all scroll containers (overflow-y: scroll/auto) and parent wrappers after mounting in the DOM.
- Complete Faux Scrollbar Elimination: Forces overflow: visible !important, height: auto !important, and max-height: none !important to prevent html2canvas from rendering grey scrollbars.
- Adaptive Canvas Window Height: Passes full calculated scrollHeight and dynamic windowHeight to html2canvas, eliminating bottom truncation on deep comment threads.
- Full Comment Thread Unclamping: Unclamps all internal scroll containers so all comments render from top to bottom without cutoffs.
- Zero Scrollbars: Completely eliminates grey native scrollbars from dialog captures.
- Eager Loading for Stickers: Disables browser lazy-loading in the offscreen render container, ensuring comment stickers and graphics render immediately.
- SVG Reaction Emojis Rasterization: Converts SVG data URLs (👍, ❤️, 😆) to crisp PNGs before rendering, eliminating html2canvas clipPath & gradient slicing bugs.
- Accurate Comment Opener: Reliably targets the post's 'Leave a comment' button when comments are not yet mounted on feed posts.
- Async Image Decoding: Awaits full image decode before canvas drawing for pixel-perfect clarity.
- Auto-Unroll Comments: Correctly triggers 'Comment' button or comment counter to open and mount collapsed comments on feed posts.
- SVG Story Avatars: Inlines avatars wrapped in SVG masks/story rings via GM_xmlhttpRequest base64 conversion.
- Header Cleanup: Removes header 'X' close/hide icon and menu triggers for clean publication-ready snapshots.
- Verified Feed Boundary Isolation: Correctly isolates single post cards without feed bleeding or capturing extra posts/stories.
- Modern Facebook Support: Added universal DOM detection for interfaces omitting role='article', locating post boundaries via aria-haspopup='menu'.
- Header Camera Button: Automatically placed directly beside the 3-dots (...) in the header on every post in the feed.
- Fixed context menu self-capture trap: Clicks on the 'Capture Post & Comments' menu item or popovers no longer overwrite the post target.
- Implemented direct role='feed' child traversal and FeedUnit mapping for 100% reliable post isolation.
- Stored 3-dots button origin post directly to guarantee the menu item captures the exact post it was opened on.
- Fixed post container detection: Resolved issue where only the post message text container was captured instead of the full post card.
- Added auto-open comments for feed posts where comment section is initially closed.
- Added HTML5 video frame snapshotting to render real video preview frames instead of empty boxes.
- Added dual data export: Export comments as UTF-8 BOM CSV (Excel compatible) and JSON.
- Integrated adaptive auto-scroll bounce to trigger Facebook lazy loading.
- Integrated synthetic mouse event dispatching and scroll-into-view for bulletproof clicking on React 18.
- Integrated comprehensive Khmer (ភាសាខ្មែរ) & English regex pattern recognition.
- Added strict safety action guards against accidental like/share/delete triggers.
- Added automatic 'All comments' comment sorting switch (bypasses Facebook's default 'Most relevant' truncation).
- Added Khmer & English multilingual detection for comment filter buttons.
- Added Tampermonkey menu command to toggle auto 'All comments' sorting.
- Initial release of Facebook Post & Comment Visual Capture.
- Implemented 3-dots post context menu integration and optional header quick button.
- Added safe auto-expansion runner with real-time status HUD.
- Added GM_xmlhttpRequest base64 avatar inlining to eliminate CORS canvas tainting.
- Added 2x Retina high-resolution PNG rendering and preview modal with clipboard copy.
You Might Also Like
Display exact, full timestamps directly on Facebook posts without hovering.
Automatically scrolls down on Facebook Reels, YouTube Shorts, and TikTok at a random progress percentage between 50% and 350%, with tab visibility, ad skipping, buffering, and safe recovery options.