GARTİC TEMA

guzeltema

当前为 2024-11-14 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         GARTİC TEMA 
// @namespace    http://tampermonkey.net/
// @version      1.2
// @description  guzeltema
// @author       akira
// @match        https://gartic.io/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    function applyGradientColor() {
        document.querySelectorAll('strong[style*="cursor: pointer;"]').forEach(element => {
            if (!element.classList.contains('gradient-color')) {
                const animationName = `gradientMove-${Math.random().toString(36).substring(7)}`;
                const keyframes = `
                    @keyframes ${animationName} {
                        0% { background-position: 0% 50%; }
                        100% { background-position: 200% 50%; }
                    }
                `;
                
                const style = document.createElement('style');
                style.innerHTML = keyframes;
                document.head.appendChild(style);

                element.style.background = 'linear-gradient(90deg, yellow, orange, yellow)';
                element.style.backgroundSize = '200% auto';
                element.style.webkitBackgroundClip = 'text';
                element.style.color = 'transparent';
                element.style.animation = `${animationName} 8s linear infinite`;
                element.classList.add('gradient-color');
            }
        });
    }

    const style = document.createElement('style');
    style.innerHTML = `
        .soft-transition {
            animation-duration: 8s;
            animation-timing-function: ease-in-out;
            animation-direction: alternate;
            animation-iteration-count: infinite;
            text-shadow: 0 0 5px currentColor, 0 0 10px currentColor, 0 0 20px currentColor, 0 0 30px currentColor;
        }
        body {
            background-color: black !important;
            filter: saturate(1.5);
        }
    `;
    document.head.appendChild(style);

    function changeBackgroundColors() {
        document.querySelectorAll('div').forEach(div => {
            const currentColor = window.getComputedStyle(div).backgroundColor;
            if (currentColor !== 'rgb(0, 0, 0)' && currentColor !== 'rgba(0, 0, 0, 0)') {
                div.style.backgroundColor = 'black';
            }
        });
    }

    setInterval(() => {
        applyGradientColor();
        changeBackgroundColors();
    }, 1);

    const observer = new MutationObserver(() => {
        changeBackgroundColors();
    });

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