CAM4 - Only "Go Private" Button

Hides tipping and interaction controls while keeping the "Go Private" button visible

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

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

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

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

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

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

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

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

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

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

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

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

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

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

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
// ==UserScript==
// @name         CAM4 - Only "Go Private" Button
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  Hides tipping and interaction controls while keeping the "Go Private" button visible
// @author       Sergi0
// @match        https://*.cam4.com/*
// @grant        none
// @icon         https://www.cam4.com/favicon.ico
// @license      MIT
// @homepageURL  https://greasyfork.org/es/scripts/590036-cam4-only-go-private-button
// @supportURL   https://greasyfork.org/es/scripts/590036-cam4-only-go-private-button/feedback
// ==/UserScript==

(function () {
    'use strict';

    function cleanToolbar() {

        // Hide quick tip buttons: 5, 10, 25, 50
        document.querySelectorAll(
            '[data-action-id="Quick Tip"]'
        ).forEach(el => {
            el.style.display = 'none';
        });

        // Hide tip menu
        document.querySelectorAll(
            '[data-action-id="Tip Menu"]'
        ).forEach(el => {
            el.style.display = 'none';
        });

        // Hide custom tip button
        document.querySelectorAll(
            '[data-action-id="Custom Tip"]'
        ).forEach(el => {
            el.style.display = 'none';
        });

        // Hide game button
        document.querySelectorAll(
            '[data-action-id="Play Game"]'
        ).forEach(el => {
            el.closest('span')?.style.setProperty('display', 'none', 'important');
        });

        // Hide Lovense button
        document.querySelectorAll(
            '[data-action-id="Lovense Toy"]'
        ).forEach(el => {
            el.closest('span')?.style.setProperty('display', 'none', 'important');
        });

        // Hide second-row interaction buttons
        [
            'Send Gift',
            'Beat The Leader',
            'Boost',
            'Complete Goal'
        ].forEach(action => {
            document.querySelectorAll(
                `[data-action-id="${action}"]`
            ).forEach(el => {
                el.closest('span')?.style.setProperty('display', 'none', 'important');
            });
        });

        // Hide token balance / purchase area
        document.querySelectorAll(
            '[data-action-id="Buy Tokens"]'
        ).forEach(el => {
            el.style.display = 'none';
        });

        // Hide three-dot menu
        document.querySelectorAll(
            '.DesktopTipBar__menuBtn'
        ).forEach(el => {
            el.style.display = 'none';
        });
    }

    // Initial cleanup
    cleanToolbar();

    // CAM4 dynamically updates the interface
    const observer = new MutationObserver(cleanToolbar);

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