Twitch Auto Skip Content Warning

Automatically clicks the "Start Watching" button on Twitch when the mature content warning appears

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला 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         Twitch Auto Skip Content Warning
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  Automatically clicks the "Start Watching" button on Twitch when the mature content warning appears
// @author       Khalil Rodriguez
// @match        https://www.twitch.tv/*
// @grant        none
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';

    // Interval for scanning the DOM (milliseconds)
    const CHECK_INTERVAL = 500;

    function tryClickStartWatching() {
        // Search for possible button texts (in different languages and UI structures)
        const buttonTexts = [
		'Start Watching',         // English
		'Начать просмотр',        // Russian
		'Comenzar a ver',         // Spanish
		'Commencer à regarder',   // French
		'Anschauen beginnen',     // German
		'Jetzt ansehen',          // German alternative
		'Inizia a guardare',      // Italian
		'Começar a assistir',     // Portuguese
		'Assistir agora',         // Portuguese alternative
		'視聴を開始',              // Japanese
		'시청 시작',               // Korean
		'开始观看',                // Chinese Simplified
		'開始觀看',                // Chinese Traditional
		'Izlemeye başla',         // Turkish
		];

        const buttons = Array.from(document.querySelectorAll('button, div[role=button]'));
        for (const btn of buttons) {
            const text = (btn.innerText || btn.textContent || '').trim();
            if (buttonTexts.some(bt => text.includes(bt))) {
                btn.click();
                return true;
            }
        }
        return false;
    }

    // Periodically run the check
    setInterval(tryClickStartWatching, CHECK_INTERVAL);
})();