Base44 Auto Close Watermark

Automatically clicks the Base44 watermark close (X) button

スクリプトをインストールするには、Tampermonkey, GreasemonkeyViolentmonkey のような拡張機能のインストールが必要です。

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

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyUserscripts のような拡張機能のインストールが必要です。

このスクリプトをインストールするには、Tampermonkeyなどの拡張機能をインストールする必要があります。

このスクリプトをインストールするには、ユーザースクリプト管理ツールの拡張機能をインストールする必要があります。

(ユーザースクリプト管理ツールは設定済みなのでインストール!)

Advertisement:

このスタイルをインストールするには、Stylusなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus などの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus tなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

(ユーザースタイル管理ツールは設定済みなのでインストール!)

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
    });

})();