NitroType - Native Mega-Text

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

이 스크립트를 설치하려면 Tampermonkey, Greasemonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey와 같은 확장 프로그램을 설치해야 합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Userscripts와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 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);

})();