您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Hapus NSFW modal, & unblur
// ==UserScript== // @name 7$6#&256$6-+22+ // @namespace Violentmonkey Scripts // @match https://www.reddit.com/* // @match https://sh.reddit.com/* // @grant none // @version 1.4 // @author Jembuds // @description Hapus NSFW modal, & unblur // @license MIT // ==/UserScript== (function () { 'use strict'; function fixScrollAndClick() { const html = document.documentElement; const body = document.body; [html, body].forEach(el => { el.style.overflow = 'auto'; el.style.position = 'static'; el.style.height = 'auto'; el.style.pointerEvents = 'auto'; }); const mainApp = document.querySelector("shreddit-app"); if (mainApp) { mainApp.style.pointerEvents = 'auto'; } } function removeAnnoyances() { // Modal NSFW dan app prompt document.querySelector("#xpromo-bottom-sheet")?.remove(); document.querySelector("#blocking-modal")?.remove(); // Blur overlay document.querySelectorAll("div[style*='backdrop-filter']").forEach(el => { if (getComputedStyle(el).position === 'fixed') el.remove(); }); // NSFW Prompt di shadow DOM const prompts = document.getElementsByTagName("xpromo-nsfw-blocking-container"); if (prompts.length > 0) { try { prompts[0].shadowRoot?.querySelector(".prompt")?.remove(); } catch (e) {} } // Hapus semua overlay tinggi lainnya document.querySelectorAll('div, faceplate-modal, shreddit-async-loader') .forEach(el => { const style = getComputedStyle(el); if ( style.position === 'fixed' && parseInt(style.zIndex) >= 100 && style.width === '100%' && style.height === '100%' ) { el.remove(); } }); // Perbaiki interaksi dan scroll fixScrollAndClick(); } // Jalankan saat halaman siap if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', removeAnnoyances); } else { removeAnnoyances(); } // Pantau perubahan dinamis const observer = new MutationObserver(removeAnnoyances); observer.observe(document, { childList: true, subtree: true, attributes: true, }); // Hentikan observer kalau Reddit bukan shreddit const interval = setInterval(() => { if (!document.querySelector("shreddit-app")) { observer.disconnect(); clearInterval(interval); } }, 8000); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址