你正在訪問的內容是外部程式的映像位址,僅用於使用者加速訪問,本站無法保證其可靠性。當前的連結位址(單點即可複製)為 https://greasyfork.org.cn/zh-CN/scripts/548145-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.
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).
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.
🚨 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.
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).
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.
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.
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;)
All features can be toggled via the Settings Panel.
This project incorporates logic and concepts derived from the following community resources: