Greasy Fork

Greasy Fork is available in English.

AiStudio Chat 主题优化

优化了AiStudio Chat板块的主题,使它不那么刺眼

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         AiStudio Chat 主题优化
// @namespace    http://120.46.24.57/
// @version      0.5
// @description  优化了AiStudio Chat板块的主题,使它不那么刺眼
// @author       ChenMo
// @match        https://aistudio.google.com/*
// @grant        GM_addStyle
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';

    // CSS 样式
    const customCSS = `
body.dark-theme {
    & .chat-turn-container .inline-code {
        color: #ffec99;
        background-color: rgba(255, 249, 219, 0.1);
    }

    /* 针对所有支持的浏览器 */
    & .chat-turn-container ::selection {
      background-color: #495057;
    }

    & .chat-turn-container.render.user .user-prompt-container .turn-content .text-chunk {
        background-color: #343a40;
        color: #efefef
    }
}

body.light-theme {
    & .chat-turn-container .inline-code {
        color: #e67700;
        background-color: rgba(255, 249, 219, 0.9);
    }

    /* 针对所有支持的浏览器 */
    & .chat-turn-container ::selection {
        background-color: #a5d8ff;
    }

    & .chat-turn-container.render.user .user-prompt-container .turn-content .text-chunk {
        background-color: #343a40;
        color: #efefef
    }
}

.chat-turn-container .ng-star-inserted:not(.footer-icon) {
    font-family: "Arial",  "Microsoft YaHei", "Hiragino Sans GB", "Helvetica Neue", Helvetica, sans-serif;
}

.chat-turn-container span.ng-star-inserted {
    font-size: 1.15rem;
    line-height: 1.7;
}

.chat-turn-container code,
.chat-turn-container .inline-code {
    font-family: "Fira Code", "Consolas" !important;
}

.chat-turn-container code {
    font-size: 1rem;
}

div.thought-container {
    max-width: 100% !important;
}
    `;

    // Inject CSS
    GM_addStyle(customCSS);

    // Log
    console.log('AiStudio Dark Optmized has been applied。');

})();