Base44 Auto Close Watermark

Automatically clicks the Base44 watermark close (X) button

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ć!)

Advertisement:

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ć!)

Advertisement:

// ==UserScript==
// @name         Base44 Auto Close Watermark
// @namespace    https://greasyfork.org/
// @version      1.0
// @description  Automatically clicks the Base44 watermark close (X) button
// @match        https://*.base44.app/*
// @grant        none
// ==/UserScript==

(function () {
    'use strict';

    function tryClickClose() {
        // Common patterns for close buttons
        const selectors = [
            'button[aria-label="close"]',
            'button[aria-label="Close"]',
            '[class*="close"]',
            '[class*="Close"]',
            'svg[aria-label="close"]',
            'div[role="button"]'
        ];

        for (const sel of selectors) {
            const elements = document.querySelectorAll(sel);
            for (const el of elements) {
                const text = (el.innerText || el.textContent || '').trim();

                // Try to detect an "X" close button
                if (
                    text === '×' ||
                    text === 'X' ||
                    el.getAttribute?.('aria-label')?.toLowerCase?.() === 'close'
                ) {
                    el.click();
                    return true;
                }
            }
        }
        return false;
    }

    // Run once immediately
    tryClickClose();

    // Watch for dynamically injected watermark
    const observer = new MutationObserver(() => {
        tryClickClose();
    });

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

})();