Gemini - Better Scrollbar

Scripted By Gemini AI! Web's Gemini Always Show Scrollbar And More Visible, Included Light & Dark Mode. Gemini网页版滚动条优化。

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

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

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

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

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

이 스크립트를 설치하려면 유저 스크립트 관리자 확장 프로그램이 필요합니다.

(이미 유저 스크립트 관리자가 설치되어 있습니다. 설치를 진행합니다!)

Advertisement:

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

(이미 유저 스타일 관리자가 설치되어 있습니다. 설치를 진행합니다!)

Advertisement:

// ==UserScript==
// @name         Gemini - Better Scrollbar
// @namespace    http://tampermonkey.net/
// @version      1.2
// @description  Scripted By Gemini AI! Web's Gemini Always Show Scrollbar And More Visible, Included Light & Dark Mode. Gemini网页版滚动条优化。
// @author       Martin______X, Gemini
// @match        https://gemini.google.com/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=google.com
// @grant        none
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';

    const css = `
        /* 1. Overall Dimensions */
        ::-webkit-scrollbar {
            width: 14px !important;
            height: 14px !important;
            display: block !important;
        }

        /* 2. Track Background */
        ::-webkit-scrollbar-track {
            background: rgba(128, 128, 128, 0.05) !important;
        }

        /* 3. Thumb Lock (Forces consistent color, disables interaction filters) */
        html body *::-webkit-scrollbar-thumb,
        html body *::-webkit-scrollbar-thumb:hover,
        html body *::-webkit-scrollbar-thumb:active {
            background-color: #1a73e8 !important;
            filter: none !important;
            -webkit-filter: none !important;
            border-radius: 6px !important;
            border: 2px solid transparent !important;
            background-clip: content-box !important;
            transition: none !important;
        }

        /* 4. Arrow Button General Settings */
        ::-webkit-scrollbar-button {
            display: block !important;
            background-color: transparent !important;
            background-repeat: no-repeat !important;
            background-size: 9px 9px !important; /* Side length set to 9px */
        }

        /* 5. Display Logic: Keep only the arrows at the extreme ends */
        ::-webkit-scrollbar-button:start:increment,
        ::-webkit-scrollbar-button:end:decrement {
            display: none !important;
        }

        /* === Vertical Scrollbar === */
        ::-webkit-scrollbar-button:vertical {
            width: 14px !important;
            height: 10px !important; /* Compact button height */
        }
        /* Up Arrow (Aligned to bottom, close to thumb) */
        ::-webkit-scrollbar-button:vertical:start:decrement {
            background-position: center bottom !important;
            background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10' fill='%231a73e8'%3E%3Cpath d='M5 1.2L9.3 8.8H0.7L5 1.2Z'/%3E%3C/svg%3E") !important;
        }
        /* Down Arrow (Aligned to top, close to thumb) */
        ::-webkit-scrollbar-button:vertical:end:increment {
            background-position: center top !important;
            background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10' fill='%231a73e8'%3E%3Cpath d='M5 8.8L0.7 1.2H9.3L5 8.8Z'/%3E%3C/svg%3E") !important;
        }

        /* === Horizontal Scrollbar === */
        ::-webkit-scrollbar-button:horizontal {
            width: 10px !important;
            height: 14px !important;
        }
        /* Left Arrow (Aligned to right) */
        ::-webkit-scrollbar-button:horizontal:start:decrement {
            background-position: right center !important;
            background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10' fill='%231a73e8'%3E%3Cpath d='M1.2 5L8.8 0.7V9.3L1.2 5Z'/%3E%3C/svg%3E") !important;
        }
        /* Right Arrow (Aligned to left) */
        ::-webkit-scrollbar-button:horizontal:end:increment {
            background-position: left center !important;
            background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10' fill='%231a73e8'%3E%3Cpath d='M8.8 5L1.2 9.3V0.7L8.8 5Z'/%3E%3C/svg%3E") !important;
        }

        /* 6. Dark Mode Adaptation */
        @media (prefers-color-scheme: dark) {
            html body *::-webkit-scrollbar-thumb,
            html body *::-webkit-scrollbar-thumb:hover,
            html body *::-webkit-scrollbar-thumb:active {
                background-color: #8ab4f8 !important;
            }
            ::-webkit-scrollbar-button:vertical:start:decrement {
                background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10' fill='%238ab4f8'%3E%3Cpath d='M5 1.2L9.3 8.8H0.7L5 1.2Z'/%3E%3C/svg%3E") !important;
            }
            ::-webkit-scrollbar-button:vertical:end:increment {
                background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10' fill='%238ab4f8'%3E%3Cpath d='M5 8.8L0.7 1.2H9.3L5 8.8Z'/%3E%3C/svg%3E") !important;
            }
            ::-webkit-scrollbar-button:horizontal:start:decrement {
                background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10' fill='%238ab4f8'%3E%3Cpath d='M1.2 5L8.8 0.7V9.3L1.2 5Z'/%3E%3C/svg%3E") !important;
            }
            ::-webkit-scrollbar-button:horizontal:end:increment {
                background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10' fill='%238ab4f8'%3E%3Cpath d='M8.8 5L1.2 9.3V0.7L8.8 5Z'/%3E%3C/svg%3E") !important;
            }
        }
    `;

    if (typeof GM_addStyle !== 'undefined') {
        GM_addStyle(css);
    } else {
        const style = document.createElement('style');
        style.textContent = css;
        document.head.appendChild(style);
    }
})();