Motherless Age Verification

Automatically clicks 'yes' during age verification

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey, Greasemonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्क्रिप्ट व्यवस्थापक एक्स्टेंशन इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्क्रिप्ट व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्टाईल व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

// ==UserScript==
// @name         Motherless Age Verification
// @namespace    http://tampermonkey.net/
// @version      2.0
// @description  Automatically clicks 'yes' during age verification
// @icon         https://motherless.com/images/logo-header-3.svg
// @author       lol_nocode
// @match        *://*.motherless.com/*
// @run-at       document-start
// @grant        none
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';

    /// 1. Hide modal AND force scroll unlock globally
    const style = document.createElement('style');
    style.textContent = `
        #ml-enter-age-modal {
            display: none !important;
            opacity: 0 !important;
            visibility: hidden !important;
            pointer-events: none !important;
        }
        /* Override the website's scroll-lock */
        html, body {
            overflow: auto !important;
            overflow-y: auto !important;
            position: static !important;
        }
    `;
    (document.head || document.documentElement).appendChild(style);

    const targetId = 'ml-age-yes';

    // 2. Core click logic
    const attemptClick = () => {
        const btn = document.getElementById(targetId);
        if (btn) {
            btn.click();
            return true;
        }
        return false;
    };

    // 3. Fallback: MutationObserver for dynamically loaded elements
    const observer = new MutationObserver((mutations, obs) => {
        if (attemptClick()) {
            obs.disconnect(); // Stop watching once clicked
        }
    });

    observer.observe(document.documentElement, {
        childList: true,
        subtree: true
    });

    // 4. Stop watching after 3 seconds to save CPU cycles
    setTimeout(() => {
        observer.disconnect();
    }, 3000);
})();