Stable Reddit NSFW unblocker (auto-updating DOM changes)
// ==UserScript==
// @name Reddit Cleaner (Final Stable)
// @namespace https://greasyfork.org/users/aakash-yadav
// @version 3.0
// @description Stable Reddit NSFW unblocker (auto-updating DOM changes)
// @author tech
// @match https://www.reddit.com/*
// @run-at document-start
// @grant none
// @license MIT
// ==/UserScript==
(function () {
'use strict';
function unblock() {
try {
// Reset body restrictions
if (document.body) document.body.style = "";
// Remove blur overlays
document.querySelectorAll("div[style*='blur']").forEach(el => el.remove());
// Remove main blocking modal
document.getElementById("blocking-modal")?.remove();
// 🔥 Handle ALL shadow popups dynamically
document.querySelectorAll("xpromo-nsfw-blocking-container").forEach(x => {
try {
if (!x.shadowRoot) return;
x.shadowRoot.querySelectorAll("*").forEach(el => {
const txt = (el.innerText || "").toLowerCase();
if (
txt.includes("mature") ||
txt.includes("view") ||
txt.includes("open") ||
txt.includes("app")
) {
el.remove();
}
});
} catch (e) {}
});
// Remove other Reddit popups
document.querySelector("xpromo-untagged-content-blocking-modal")?.remove();
document.querySelector("shreddit-exit-app-modal")?.remove();
document.querySelector("shreddit-content-gate")?.remove();
// Extra fallback: remove visible overlay text anywhere
document.querySelectorAll("*").forEach(el => {
const txt = (el.innerText || "").toLowerCase();
if (
txt === "open in app" ||
txt === "view in app" ||
txt.includes("mature content")
) {
el.remove();
}
});
} catch (e) {}
}
// Run continuously (important for Reddit dynamic UI)
setInterval(unblock, 800);
})();