Facebook Login Wall Remover

Optimizes the guest browsing experience on Facebook desktop by removing login barriers and enhancing feed navigation, content expansion, and post data export tools.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

Author
StonedKhajiit
Daily installs
6
Total installs
1,914
Ratings
8 1 0
Version
0.9.7
Created
2025-09-02
Updated
2026-05-31
Size
507 KB
License
MIT
Applies to

Facebook Login Wall Remover

A guest browsing optimization userscript for Facebook Desktop site.
Automatically removes login barriers, enables page search, provides content extraction tools, and improves browsing stability for logged-out guest users.


🎥 Watch Script Demo Video


📄 Project Overview

This userscript is designed to optimize the guest browsing experience on Facebook Desktop. It hides login prompts and overlays, and resolves specific limitations on guest access (such as search functionality and scroll locking) to provide a stable reading environment.

✨ Feature Specifications

🛡️ Browsing Stability Optimization

  • Login Prompt Removal: Automatically detects and hides DOM elements that obstruct content, including dialog popups, sticky bottom banners, and background overlays.
  • Media Link Isolation: To prevent feed loading failures caused by frequent usage of the built-in media viewer, click events on Reels, videos, and photos are redirected to open in a new tab, preserving main feed navigation.
  • Scroll Position Restoration (Scroll Fix): Resolves the issue where closing a post modal resets the scroll position to the top. The script records the sequence of the post being read and scrolls back to it after the dialog is closed.
  • Auto Error Recovery: Automatically reloads the page when generic error pages ("Something went wrong") or empty feeds are detected.

🚀 Data & Content Extraction Tools

  • Auto scroll Loader: Provides automatic scrolling to load posts. Right-click the button to toggle between "Incremental Mode" and "Target Count Mode". Stops automatically if loading freezes.
  • Batch Export Posts (Batch Copier): Supports exporting currently loaded posts in batch.
    • Copy to Clipboard: Combines post text into a single clipboard entry.
    • Download as File: Exports as TXT, JSON, or CSV formats (CSV is available in download mode only).
    Users can choose to include metadata such as author info, post date, and interaction stats.
  • Formatted Copying: Adds a copy button to post headers that preserves text paragraph structures and converts image-based emojis back into standard Unicode characters.
  • Post Screenshot: Adds a screenshot button to post headers. Renders and exports the post card as JPEG or PNG using the SnapDOM engine. Automatically excludes comments for a clean, high-quality offline archive.
  • Permalink Copier & Sanitizer: Uses a background page interaction to asynchronously resolve the canonical URL of a post. Removes tracking parameters and supports four format preferences (Full URL, ID Mode, Username Mode, Shortest).
  • Local Bookmarks: Provides an offline bookmark system to save posts and profiles, resolving the guest restriction on saving posts. Supports folder categorization, full-text viewing, JSON backup exporting, and storage resetting.

🔍 Analysis & Transparency Tools

  • ID Revealer: Clicking the main Profile or Page header (H1) reveals and copies the User ID or Page ID.
  • Timeline Sidebar Navigator: Injects a sidebar index of posts supporting two sorting preferences:
    • ⏱️ Chronological: Lists posts in order and synchronizes active highlighting with scroll position.
    • 🔥 Heatmap Sort: Reorders posts based on interaction weights (Reactions × 1 + Comments × 2 + Shares × 3) for quick discovery of popular posts.
  • Transparency Shortcuts: Injects quick access buttons to navigate directly to the Ad Library of the current page or open the page transparency modal.
  • Page & Group Search Bar: Integrates a Google Site Search module on the top toolbar to search posts, photos, and videos within the current page or group, bypassing guest search limits.

🛠️ Interface Adjustments

  • Hide Non-functional Elements: Hides login-prompting interactive elements (such as likes/comments/shares feedback buttons) to minimize visual noise.
  • Post Index Numbering: Displays sequence numbers on posts to track reading progress.
  • Advanced Navigation: Supports Vim-style hotkeys (J/K) and Shift + scroll wheel to jump between posts.
  • Text Auto-expander: Automatically expands truncated text by clicking "See more" triggers.
  • Video Audio Control: Automatically unmutes videos and applies custom volume settings.


⚠️ Known Limitations & Compatibility

🚨 Group Page (/groups/) Restrictions:
Many Facebook Group pages enforce logins to view content. This is a server-side permission limit that cannot be bypassed by scripts.

🚨 VPN / Cloudflare WARP Compatibility:
Using Cloudflare WARP or specific VPN IPs may trigger guest access denials from Facebook, resulting in blank feeds. Disabling the proxy or changing the IP address is recommended.

Server-Side Rate Limiting:
Infinite scrolling depends on server-side session responses. Extended browsing sessions may trigger rate limiting where API calls stop returning new posts. Opening a new Incognito window resets the session.

💡 Recommended in "Incognito Window":
In standard browsing mode, Facebook may not serve full DOM elements or expose complete ID metrics, causing URL parsing failures. Running in an Incognito window ensures optimal DOM layouts and higher extraction success rates.

💡 Self-Hosting Alternatives:
For self-hosting environments, using Phice via Docker is recommended. Inspired by Nitter and Invidious, Phice is a lightweight, privacy-oriented Facebook alternative front-end that does not require an account or trackers to view public feeds.

🔒 Permissions & Transparency (@grant)

This script declares several GM (Greasemonkey) API permissions to deliver a complete feature experience. All operations are run locally, and no user data is collected or uploaded. Below is the purpose of each declared permission:

🔻 Click to view permission details
API Permission (@grant) Specific Purpose
GM_getValue, GM_setValue Saves and loads user configurations, video volume settings, and offline bookmark database locally.
GM_deleteValue, GM_listValues Manages cache, resets configurations, and clears bookmark storage space.
GM_setClipboard Copies post content (formatted), canonical URLs, and revealed IDs directly to the system clipboard.
GM_addValueChangeListener,
GM_removeValueChangeListener
Enables inter-tab communication (IPC) between the main tab and background Workers (e.g., syncing URL resolution status).
GM_openInTab Opens post URLs in background tabs silently (Worker mode) to asynchronously resolve clean canonical URLs.
GM_registerMenuCommand,
GM_unregisterMenuCommand
Registers entries in the script manager extension menu (e.g., opening the settings panel).
GM_xmlhttpRequest Used for post screenshots. Facebook avatars and media are stored on CDNs; this API downloads them asynchronously (bypassing CORS) to convert them into local Base64 Data URLs for canvas rendering.
window.close Closes the background worker tab automatically after resolving URL metrics to save resources.


💡 uBlock Origin Recommended Filters (Desktop)

While this script operates independently, combining it with uBlock Origin (uBO) filters is recommended to hide login prompts before script execution:

🔻 Click to view filters

Add the following filters to the "My filters" tab in your uBO dashboard:

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 ensure that "Allow custom filters requiring trust" is checked under the "My filters" tab for trusted-click-element rules to function.

📚 Credits

This project references and integrates logic from the following community resources:

  • uBlock Origin Team (u/AchernarB): Rules for login prompt bypass and CSS filtering.
  • t-wy (GitHub Gist): Regex patterns for standard identifier extraction.
  • SnapDOM (Zumer Lab) (MIT License): High-performance DOM serialization and screenshot rendering library used for post screenshot exports.


🛠️ Development Info & Technology Stack (For Developers)

This project uses a modern web development toolchain for modular refactoring and building:

  • Core Language: TypeScript / JavaScript (ES6+)
  • Build Tools: Vite + vite-plugin-monkey (automates userscript metadata header generation and bundling)
  • UI Framework: Preact (a lightweight virtual DOM library used to render custom settings modals and timeline navigators)
  • State Management: @preact/signals (provides fine-grained reactive updates to optimize performance under Facebook's high-frequency DOM mutations)


Execution Environment Specifications
Target: Desktop Site (www.facebook.com)
Scope: Guest Mode (Logged Out) Only
Recommended Manager: Violentmonkey