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.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

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

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

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

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

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.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

Δημιουργός
StonedKhajiit
Ημερήσιες εγκαταστάσεις
14
Σύνολο εγκαταστάσεων
2.764
Βαθμολογίες
11 0 0
Έκδοση
1.1.0
Δημιουργήθηκε την
02/09/2025
Ενημερώθηκε την
30/08/2026
Μέγεθος
600 KB
Άδεια
MIT
Εφαρμόζεται σε

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.
  • Following List Extractor: Provides a Floating Action Button (FAB) on profile following pages (/following or /followers). Left-click to immediately copy currently loaded items; right-click to trigger human-like smooth scrolling to load and export the complete following list, equipped with loading stall circuit breaker protection.
  • Proactive Link Sanitizer: Automatically resolves and removes Facebook redirection wrappers (such as l.facebook.com) directly in DOM attributes, allowing native right-click copying of clean destination URLs.
  • 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 & Hover Preview: Injects a floating timeline index with interaction heatmap on the right edge, featuring three sorting modes and hover previews:
    • ⏱️ Chronological: Displays posts in load order with real-time active scroll highlighting.
    • 🔥 Heatmap Sort: Ranks posts by engagement metrics (reactions, comments, shares) to quickly discover top posts.
    • 📏 Length Sort: Sorts posts by genuine text character count (longest first) to easily locate in-depth articles.
    • 👁️ Hover Preview Tooltip: Hovering over timeline nodes reveals a structured preview card showing the author, post time, rich media badges, and snippet; includes configurable snippet length (0–500 chars) in settings.
  • Transparency Shortcuts: Injects quick access buttons to navigate directly to the Ad Library of the current page or open the page transparency modal.
  • Top Search Bar & Live Feed Filter: Provides a versatile top search toolbar. Supports pressing / to quick-focus and Esc to dismiss; features live keyword highlighting, instant filter chips (All / Text / Photos / Videos), and integrates Google Site Search for comprehensive page and group queries.

🛠️ Interface Adjustments

  • Hide Non-functional Elements: Hides login-prompting interactive elements (such as likes/comments/shares feedback buttons) to minimize visual noise.
  • Post Numbering & Metadata Badge: Numbers posts sequentially. Hovering over any post number badge instantly displays rich on-demand metadata: clean character count (with truncated indicator), photo counts, video duration, shared post dissection (outer comment vs. inner original), external card domains (e.g. bbc.com), events, polls, fundraisers, and live stream status.
  • 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.

Server-Side Post ID Masking:
If Facebook degrades feed timestamps into homepage links lacking post IDs (e.g. pfbid), permalink features may be limited. Workaround: Click "View more comments" or the comment count/icon to open the post modal; modal timestamps still provide pfbid links. Alternatively, reopen Incognito or switch IPs.

💡 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.

💡 AdGuard / uBlock Origin Recommended Filters (Mobile)

For the login popup on the Facebook mobile site, you can use the following AdGuard or uBlock Origin filters to hide it.

⚠️ Note: These filters hide the login prompts and prevent scroll lock, but they do not fix the issue where Facebook blocks dynamic content loading on the mobile version. You will still only be able to see about five posts on a page's feed before loading stops.
🔻 Click to view mobile filters

Add the following filters to your AdGuard (User Rules) or uBlock Origin (My Filters) dashboard:

! Top login toolbar
facebook.com##div.fixed-container.top:has(div[role="button"])

! Login prompt modal
facebook.com##div[role="dialog"][aria-modal="true"]:has(a[href*="/login/"], a[href*="/reg/"]):upward(div.fixed-container)

! Fix page scrolling / Prevent scroll lock
facebook.com##body:remove-class(prevent-scrolling)
facebook.com##html, body:style(overflow: auto !important; scroll-behavior: auto !important;)

📚 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