您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Access Facebook Marketplace and listings without an account! Removes overlays via heuristic detection
// ==UserScript== // @name Facebook Marketplace Overlay Remover // @namespace http://github.com/tlorien // @version 0.1 // @description Access Facebook Marketplace and listings without an account! Removes overlays via heuristic detection // @author tlorien // @match *://*.facebook.com/marketplace* // @grant none // @license MIT // ==/UserScript== (function() { 'use strict'; function isLikelyOverlay(element) { const rect = element.getBoundingClientRect(); const viewportArea = window.innerWidth * window.innerHeight; const elementArea = rect.width * rect.height; const coversMostOfTheViewport = elementArea > viewportArea * 0.5; // covers more than 50% of the viewport const isFixedOrAbsolute = ['fixed', 'absolute'].includes(getComputedStyle(element).position); const hasHighZIndex = parseInt(getComputedStyle(element).zIndex, 10) > 100; return coversMostOfTheViewport && isFixedOrAbsolute && hasHighZIndex; } function removeSuspectedOverlays() { document.querySelectorAll('body *').forEach(element => { if (isLikelyOverlay(element)) { element.remove(); } }); } removeSuspectedOverlays(); const observer = new MutationObserver(mutations => { mutations.forEach(mutation => { if (mutation.addedNodes.length) { removeSuspectedOverlays(); } }); }); observer.observe(document.body, { childList: true, subtree: true }); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址