NitroType - Native Mega-Text

Enlarges the native race text so only 1-2 words fit in the box at a time.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला 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         NitroType - Native Mega-Text
// @namespace    http://tampermonkey.net/
// @version      23.0
// @description  Enlarges the native race text so only 1-2 words fit in the box at a time.
// @author       Electric
// @match        *://*.nitrotype.com/race
// @match        *://*.nitrotype.com/race/*
// @grant        none
// @run-at       document-start
// ==/UserScript==

(function() {
    'use strict';

    // 1. CSS to transform the existing game area
    const style = document.createElement('style');
    style.innerHTML = `
        /* Make the dashboard area taller to hold the massive text */
        .dash-copyContainer {
            height: 250px !important;
            display: flex !important;
            align-items: center !important;
            justify-content: center !important;
            overflow: hidden !important; /* Hide words that spill out */
            background: rgba(0,0,0,0.9) !important;
            border-radius: 15px;
            border: 2px solid #333;
        }

        /* The actual word container */
        .dash-copy {
            width: 100% !important;
            text-align: center !important;
            position: relative !important;
            top: 0 !important;
            left: 0 !important;
        }

        /* Make ALL words big, but the current one huge */
        .dash-word {
            font-size: 60px !important; /* Size of upcoming words */
            margin: 0 20px !important;
            transition: all 0.1s ease !important;
            opacity: 0.2 !important; /* Dim the others */
            display: inline-block !important;
        }

        /* THE CURRENT WORD: Massive, White, and Centered */
        .dash-word.is-current {
            font-size: 130px !important; /* Massive size */
            opacity: 1 !important; /* Full brightness */
            color: #ffffff !important;
            text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
            font-weight: 900 !important;
        }

        /* Hide the cursor which might flicker at this scale */
        .dash-cursor {
            display: none !important;
        }

        /* Hide ads and headers to keep the box centered */
        .race-header, .race-v3-ui-ads {
            display: none !important;
        }
    `;
    (document.head || document.documentElement).appendChild(style);

    // 2. Auto-scroll logic to keep the current word in the middle
    function centerCurrentWord() {
        const current = document.querySelector('.is-current');
        const container = document.querySelector('.dash-copyContainer');
        
        if (current && container) {
            // This ensures the current word stays within the visual frame
            current.scrollIntoView({ behavior: "smooth", block: "center", inline: "center" });
        }
    }

    // Run centering frequently to handle rapid bursts
    setInterval(centerCurrentWord, 50);

})();