chatgpt css

Customize styles for ChatGPT tables and text

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         chatgpt css
// @description  Customize styles for ChatGPT tables and text
// @match        https://chat.openai.com/*
// @match        https://chatgpt.com/*
// @version 0.0.1.20251120063615
// @namespace https://greasyfork.org/users/1435046
// ==/UserScript==

(function () {
    const style = document.createElement('style');
style.id = 'chatgptCssStyleId';

    style.textContent = `
        *:not(.katex):not(.katex *) {
            min-width: revert !important;
            -webkit-line-clamp: revert !important;
            white-space: revert !important;
            margin-left: revert !important;
            margin-right: revert !important;
        }

        html,
        body {
            background-color: revert !important;
        }

html {
    box-shadow: inset 0 0 0 1px red;
}
        div:has(> div > button[data-testid="open-sidebar-button"]) {
            background-color: revert !important;
        }

        .content-fade:after {
            background-image: revert !important;
        }

        div[class*="tableContainer"] {
            /*width: unset !important;*/
            width: revert !important;
        }

        div[class*="tableContainer"] *:not(.katex):not(.katex *) {
            padding: revert !important;
            height: revert !important;
        }

        div.text-base {
            padding: revert !important;
        }

        .katex {
            display: block !important;
            overflow-x: auto !important;
            overflow-y: hidden !important;
        }

        .bg-token-message-surface, .user-message-bubble-color {
            background-color: red !important;
    color: black;
        }

        button {
            white-space: revert !important;
        }

        div[data-radix-popper-content-wrapper] {
            transform: revert !important;
            left: revert !important;
        }

[dir=ltr] div[data-radix-popper-content-wrapper]:has(>div[data-side=right]) {
    left: revert !important;
}
        div[data-radix-popper-content-wrapper],
        div[data-radix-popper-content-wrapper] * {
            width: revert !important;
            min-width: revert !important;
            white-space: revert !important;
            overflow-wrap: anywhere !important;
        }

        div:has(> button > div > span > svg > path[d^="M6.24992 11.0417C6.65578 11.0417 7.04227"]) {
            width: revert !important;
        }

div:has(> button > svg > path[d^="M9.33468 3.33333C9.33468"]) {
    display: none !important;
}

div:has(> div > div > div > aside > div > div > img[src="https://openaiassets.blob.core.windows.net/$web/chatgpt/filled-plus-icon.png"]) {
    display: none !important;
}

button:has(> svg > path[d*='M16.002 10.665H10.665V16.835H14.167C15.1803']) {
    display: none !important;
}
        `;
    document.head.appendChild(style);
})();