Terminalize

A user script that terminalizes every website you visit

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

ستحتاج إلى تثبيت إضافة مثل Stylus لتثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتتمكن من تثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتثبيت هذا النمط.

(لدي بالفعل مثبت أنماط للمستخدم، دعني أقم بتثبيته!)

// ==UserScript==
// @name        Terminalize
// @namespace   Violentmonkey Scripts
// @match       *://*.*/*
// @require     https://code.jquery.com/jquery-3.6.0.min.js
// @grant       none
// @version     1.0
// @author      BluePhi09
// @description A user script that terminalizes every website you visit
// @license     MIT
// ==/UserScript==

(function ($) {
    'use strict';

    function terminalize() {
        $('body *').each(function(){
            const $element = $(this);
            if ($element.data('terminalfonted')) return;
            $element.data('terminalfonted', true);
            $element.css('font-family', 'Courier New, Courier, monospace');
        });
        $('p:not(:has(a)), h1:not(:has(a)), h2:not(:has(a)), h3:not(:has(a)), span:not(:has(*)), li:not(:has(a, form)), a:not(:has(img))').each(function () {
            const $element = $(this);
            if ($element.data('terminalized')) return;
            $element.data('terminalized', true);

            const fullText = $element.text();
            let index = 0;
            $element.text('');

            function typeChar() {
                if (index < fullText.length) {
                    $element.text($element.text() + fullText.charAt(index));
                    index++;
                    setTimeout(typeChar, 60 + Math.random() * 100);
                }
            }

            typeChar();
        });
    }

    terminalize();

    const observer = new MutationObserver(() => {
        terminalize();
    });
    observer.observe(document.body, { childList: true, subtree: true });

    $(document).on('input', 'input, textarea', function () {
        if ($(this).val().toLowerCase().includes('hacking')) {
            spawnMatrixRain();
        }
    });

    function spawnMatrixRain() {
        for (let i = 0; i < 60; i++) {
            setTimeout(() => {
                createMatrixLetter();
            }, i * 100);
        }
    }

    function createMatrixLetter() {
        const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
        const letter = chars.charAt(Math.floor(Math.random() * chars.length));
        const $span = $('<span>')
            .text(letter)
            .css({
                position: 'fixed',
                left: Math.random() * window.innerWidth + 'px',
                top: '-40px',
                color: '#00ff00',
                fontSize: '2em',
                fontFamily: 'monospace',
                zIndex: 9999,
                pointerEvents: 'none',
                opacity: 0.8,
                textShadow: '0 0 8px #0f0, 0 0 16px #0f0'
            })
            .appendTo('body');

        $span.animate(
            { top: window.innerHeight + 'px', opacity: 0.1 },
            1200 + Math.random() * 1200,
            'linear',
            function () {
                $span.remove();
            }
        );
    }

})(window.jQuery);