Reddit NSFW Media Unlocker (April 2026)

Stable Reddit NSFW unblocker (auto-updating DOM changes)

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name         Reddit NSFW Media Unlocker (April 2026)
// @match        https://www.reddit.com/*
// @grant        none
// @run-at       document-start
// @version 0.0.1.20260417144048
// @namespace https://greasyfork.org/users/aakash-yadav
// @description Stable Reddit NSFW unblocker (auto-updating DOM changes)
// ==/UserScript==

(function() {
    'use strict';

    function fixReddit() {
        // 1. Force Scroll (Unfreezes the page)
        document.documentElement.style.overflow = 'auto';
        document.body.style.overflow = 'auto';

        // 2. Clear the full-screen app walls
        document.querySelectorAll('shreddit-experience-tree, shreddit-async-loader, #blocking-modal').forEach(el => el.remove());

        // 3. PIERCE SHADOW DOM (Fixes the text & black screen in your screenshots)
        document.querySelectorAll('shreddit-blurred-container, xpromo-nsfw-blocking-container').forEach(container => {
            container.removeAttribute('reason'); // Strip the lock
            
            if (container.shadowRoot) {
                // Find the hidden 'Verify' button and CLICK it to fetch media metadata
                const btn = container.shadowRoot.querySelector('button, [role="button"], a');
                if (btn) btn.click();

                // Inject CSS into the Shadow DOM to hide the blur and show the content
                if (!container.shadowRoot.querySelector('style#bypass')) {
                    const style = document.createElement('style');
                    style.id = 'bypass';
                    style.textContent = `
                        [slot="blurred"], .prompt, xpromo-nsfw-blocking-modal-v2 { display: none !important; }
                        [slot="content"] { display: block !important; filter: none !important; }
                    `;
                    container.shadowRoot.appendChild(style);
                }
            }
        });
    }

    // Run every 500ms to catch lazy-loaded content
    setInterval(fixReddit, 500);
})();