你正在訪問的內容是外部程式的映像位址,僅用於使用者加速訪問,本站無法保證其可靠性。當前的連結位址(單點即可複製)為 https://greasyfork.org.cn/zh-CN/scripts/548145-facebook-login-wall-remover,源站連結 點此以跳轉

Facebook Login Wall Remover

This script improves the guest browsing experience on the Facebook desktop site. It aims to remove common interruptions and add helpful features for users who are not logged in.



點此查看下載連結位址https://update.greasyfork.org.cn/scripts/548145/Facebook%20Login%20Wall%20Remover.user.js

安装此脚本?
作者
StonedKhajiit
日安装量
8
总安装量
617
评分
6 0 0
版本
0.5.0
创建于
2025-09-02
更新于
2026-01-05
大小
176.1 KB
许可证
MIT
适用于

Facebook Login Wall Remover

A comprehensive UserScript for enhancing the guest browsing experience on Facebook Desktop.
Systematically removes login obstructions, enables contextual search, 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 missing features (like Search), providing a smooth, app-like reading experience for public content.

⚠️ Compatibility & Known Limitations

🚨 Group Page (/groups/) Restrictions:
Facebook enforces strict server-side access controls on Group pages. In most cases, the server refuses to serve content to guest users immediately. This UserScript operates on the client side and cannot bypass server-side access denials.

🚨 Cloudflare WARP Incompatibility:
Users enabling Cloudflare WARP 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 more efficient for hiding the initial login modal (CSS/Scriptlets execute faster than UserScripts).

🔻 Click to view recommended uBO filters

The following filters were shared by u/AchernarB (uBlock Origin 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 on mobile, you can use the following custom rules in AdGuard or uBlock Origin to hide login popups.

⚠️ Important Mobile Limitation:
These rules only hide the visual obstructions (banners/modals). Due to strict server-side blocks on the mobile site, infinite scrolling will stop working after loading exactly 9 posts (effectively leaving only 8 posts fully viewable). This cannot be fixed by client-side rules.

🔻 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;)

✨ Feature Specification

🛡️ Core Stability Enhancements

  • Login Wall Removal: 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 logic that locks the main feed's loading mechanism if the internal media viewer (theater mode) is used excessively.
    Solution: The script intercepts click events on photos/videos and forces them to open in a New Tab. This isolates the media viewing session, preserving the integrity of the main feed's navigation.
  • Scroll Position Restoration: Maintains the viewport context. When modals are closed, the script automatically restores the user's vertical scroll position, correcting the native behavior where the page often resets to the top (Y=0).
  • Auto-Error Recovery: Automatically triggers a reload sequence when generic error pages ("Something went wrong") are detected.

🔍 Analysis & Transparency Tools

  • ID Revealer: Extracts immutable identifiers (User ID and Page ID) by parsing the document's `meta` tags and JSON datasets. Accessible by clicking the Profile/Page title.
  • 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 search interface and handling AdBlock warnings.
    • Page Transparency: Directly triggers the internal modal showing admin locations and history.
  • Smart Permalink Copier: Appends a link button to posts. Uses a background worker to fetch the Canonical URL, ensuring the copied link is free of tracking parameters (e.g., `?set=`, `&__cft__`).

🧭 Navigation & Search

  • Sequential Navigation: Implements keyboard-driven navigation (RSS-reader style).
    • Keyboard: J (Next) / K (Previous).
    • Mouse: Shift + Scroll Wheel.
    • UI: On-screen floating arrows.
  • Contextual Search: Injects a toolbar containing a Google Site Search module restricted to the current Page or Group, providing a robust workaround for the lack of native search for guests.

🛠️ Interface Adjustments

  • UI Cleanup: Hides non-functional interactive elements (e.g., "Like", "Comment" buttons) to reduce visual clutter.
  • Post Numbering: Displays a sequence number on feed posts to track reading progress.
  • Auto-Unmute: Automatically enables audio for video elements in the feed.
  • Content Expansion: Automatically triggers "See more" on truncated text posts.

⚙️ Configuration

All features can be toggled via the Settings Panel.

  1. Toolbar Icon: Click the Gear Icon (⚙️) on the injected toolbar (top-right).
  2. Violentmonkey Menu: Open the extension menu and select "⚙️ Settings".

📚 Credits & Acknowledgements

This project incorporates logic and concepts derived from the following community resources:


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