Facebook Login Wall Remover
A comprehensive UserScript for enhancing the guest browsing experience on Facebook Desktop.
Systematically removes login obstructions, enables contextual search, provides powerful content extraction tools, and enhances browsing stability for guest users (logged-out state).
🎥 View Live Preview (Demo)
📄 Project Overview
This UserScript is a browser enhancement tool designed to make Facebook usable without an account. Standard guest browsing is often frustrating due to constant "Log In" popups and broken navigation. This script automatically removes those annoying banners, fixes scrolling issues, and restores access to content, providing a smooth, app-like reading experience.
✨ Complete Feature Specification
🛡️ Stability & Core Optimization
- Login Wall Removal:
Aggressively detects and removes intrusive DOM elements including `Dialog` modals, sticky bottom banners, and full-screen overlays that interrupt content consumption.
- Deadlock Prevention (Media Isolation):
Context: Facebook implements anti-guest mechanisms that lock the main feed's loading trigger if the internal media viewer (theater mode) is used.
Solution: The script intercepts click events on photos, videos, and Reels, forcing them to open in a New Tab. This isolates the media viewing session, preserving the integrity of the main feed's navigation and preventing infinite loading errors.
- Scroll Position Restoration (Scroll Fix):
Addresses the annoying behavior where opening a post modal resets your scroll position to the top. This script memorizes the index of the post you were reading and automatically restores your view to that specific post after you close the modal, ensuring you never lose your place in the feed.
- Auto-Error Recovery:
Automatically triggers a reload sequence when generic error pages ("Something went wrong") or empty feeds are detected.
🚀 Productivity & Extraction Tools
- Auto-Loader (Infinite Scroll Helper):
A floating tool (bottom-right) that automatically scrolls the feed to load more content.
Advanced Use: Right-click the button to toggle between "Incremental Mode" and "Target Count Mode". Includes deadlock detection to stop automatically if the feed freezes.
- Batch Copier & Downloader:
One-click export of all currently loaded post content.
Supported Modes:
- Clipboard Mode: Combines all text into a single clipboard entry.
- Download Mode: Exports content as a file (Support for TXT, JSON, or CSV formats).
* Rich Metadata Options: Include Author info, Interaction Stats (Likes/Comments/Shares), Post Date, Media Counts, etc.
- Smart Content Copier:
Adds a "Copy Content" button to every post header. Unlike standard text selection, this tool preserves paragraph structure and intelligently converts image-based Emojis back into standard Unicode characters for perfect archiving.
- Smart Permalink:
Fetches the Canonical URL for any post using a background worker interaction. Removes all tracking parameters (e.g., `?set=`, `&__cft__`).
4 Formats Available:
- Full URL: Standard desktop URL.
- ID Mode:
AuthorID/PostID (Most reliable).
- Username Mode:
Username/PostID.
- Shortest:
fb.com/PostID.
🔍 Analysis & Transparency
- ID Revealer:
Clicking a Profile or Page title instantly reveals and allows copying of immutable identifiers (User ID and Page ID), which are often hidden in the new UI.
- Timeline Sidebar & Heatmap:
(Optional) A sidebar navigator that visualizes the feed. Supports two sorting modes:
- ⏱️ Chronological: Lists posts in order and tracks your reading progress.
- 🔥 Heatmap Sort: Reorders posts based on interaction engagement (Formula: Reaction×1 + Comment×2 + Share×3), allowing you to jump directly to the most popular content.
- Transparency Shortcuts:
Injects floating buttons (bottom-left) for quick access to official transparency data:
- Ad Library: Extracts the `asset_id` and navigates directly to the entity's active ads, bypassing the broken search interface.
- Page Transparency: Directly triggers the internal modal showing admin locations and history.
- Contextual Search Bar:
Injects a top toolbar containing a Google Site Search module, automatically restricted to the current Page or Group, enabling search functionality for guests (Posts, Photos, Videos).
🛠️ Interface & Customization
- UI Cleanup: Hides non-functional interactive elements (e.g., "Like", "Comment" buttons) that prompt for login.
- Post Numbering: Displays a sequence number on feed posts to track reading progress.
- Advanced Navigation:
- Keyboard: Vim-style hotkeys (J / K) for sequential navigation.
- Wheel Nav: Hold Shift + Scroll Wheel to jump between posts.
- Highlighter: Highlights the active post border for better focus.
- Text Expander: Automatically clicks "See more" on long text posts.
- Smart Media Control: Automatically unmutes feed videos and sets the volume to a comfortable default (25%).
⚠️ Compatibility & Known Limitations
🚨 Group Page (/groups/) Restrictions:
Facebook Group pages often mandate a login to view content. This is a strict server-side permission setting that UserScripts cannot bypass.
🚨 Cloudflare WARP / VPN Incompatibility:
Users enabling Cloudflare WARP or certain VPNs may encounter empty/blank feeds on Fan Pages. Facebook strictly limits guest access from these specific IP ranges.
Solution: Temporarily disable WARP if the feed fails to load.
Server-Side Rate Limiting:
Infinite scrolling is subject to server-side session limits. After extensive browsing, the API may stop returning new posts.
Solution: Close the window and open a new Incognito/Private window to reset the session.
💡 Pro Tip for uBlock Origin Users (Desktop)
While this script is fully standalone, using uBlock Origin (uBO) with specific custom filters is highly recommended for better performance (hiding the initial modal before the script even loads).
🔻 Click to view recommended uBO filters
The following filters were shared by u/AchernarB (uBO Team). Add them to your "My filters" tab in uBO settings:
facebook.com##+js(trusted-click-element, body > div[id^="mount"] #scrollview ~ div div[role="button"]:has(> div[data-visualcompletion="ignore"]) )
facebook.com##div[id^="mount"] div:not([id]):not([class]):not([style]) > div[data-nosnippet]
facebook.com##+js(aeld, scroll)
facebook.com##body > div[class*="__fb-light-mode"]
! click cookies
facebook.com##+js(trusted-click-element, [role="dialog"]:has([href="https://www.facebook.com/policies/cookies/"]) [aria-hidden="true"] + [aria-label][tabindex="0"], , 1000)
! hide the fixed top-banner "send a message"
facebook.com##.rq0escxv.du4w35lb.rek2kq2y.lpgh02oy[style*="top: 56px;"]
! un-fix the login banner (will scroll)
facebook.com##div[role="banner"] > *, div[role="banner"] > div:not(:first-child) > div > div:has([aria-label="Facebook"]):style( position: absolute !important; )
facebook.com##div[role="banner"] + div div[style="top: 56px; z-index: 1;"]:style( position: static !important; )
⚠️ Requirement: You must verify that "Allow custom filters requiring trust" is checked in the "My filters" tab for the `trusted-click-element` scriptlet to work.
📱 Mobile Web Support (m.facebook.com)
This UserScript is designed strictly for the Desktop Site. However, if you browse via m.facebook.com, you can use the following custom rules in AdGuard or uBlock Origin.
⚠️ Important Mobile Limitation:
Due to strict server-side limitations on the mobile site, infinite scrolling will stop working after loading exactly 9 posts. This cannot be fixed by client-side scripts.
🔻 Click to view Mobile (m.facebook) Filters
Copy and paste these into your "My filters" (uBO) or "User rules" (AdGuard):
! Login prompt modal
m.facebook.com##div[role="dialog"][aria-modal="true"]:has(a[href*="/login/"], a[href*="/reg/"]):upward(div.fixed-container)
! Top login toolbar
m.facebook.com##div.fixed-container.top:has([role="button"][aria-label*="Log In"i], a[href*="/login/"])
! Fix page scrolling / Prevent scroll lock
m.facebook.com##body:remove-class(prevent-scrolling)
m.facebook.com##html, body:style(overflow: auto !important; scroll-behavior: auto !important;)
⚙️ Configuration
The script features a comprehensive settings panel allowing you to tweak:
- Navigation: Customize "Wheel Nav" modifier keys (Shift/Alt/Ctrl), rebind Vim hotkeys, and set scroll alignment (Center/Top/Bottom).
- Tool Behavior: Toggle Batch Download formats (TXT/JSON/CSV) and auto-expand sensitivity.
- Custom Output:
- Permalink Preference: Full / ID-based / Shortest.
- Metadata Menu: Toggle fields to include in exports (Post Order, Author Name/Link, Date, Stats, Media Count, Link Previews, etc.).
- Privacy & UI: Toggle ID Revealer, Heatmap, or Floating Button opacity.
- Toolbar Icon: Click the Gear Icon (⚙️) on the injected top-right toolbar.
- Violentmonkey: Open the extension menu and select "⚙️ Settings".
📚 Credits
- uBlock Origin Team (u/AchernarB): Login wall bypass and CSS filter logic.
- t-wy (GitHub Gist): Standard ID extraction regex patterns.
ENVIRONMENT
Target: Desktop Site (www.facebook.com)
Scope: Guest Mode (Logged Out) Only
Recommended Manager: Violentmonkey