Greasy Fork

Greasy Fork is available in English.

DeepSeek紧凑化

DeepSeek紧凑化,使得小屏幕可以显示更多内容

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         DeepSeek紧凑化
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  DeepSeek紧凑化,使得小屏幕可以显示更多内容
// @author       zhuoy
// @match        https://chat.deepseek.com/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=deepseek.com
// @grant        none
// @license MIT
// ==/UserScript==

(function() {
    'use strict';

    // 定义全局样式
    const globalStyles = `
        .be88ba8a {
            max-height: 40px !important;
            overflow: hidden !important;
        }
        .f8d1e4c0 {
            max-height: 40px !important;
            display: flex !important;
            align-items: center !important;
            justify-content: space-between !important;
            flex-wrap: nowrap !important;
        }
        .d8ed659a {
            max-height: 40px !important;
            line-height: 1 !important;
            font-size: 16px !important;
        }
        .ds-icon {
            font-size: 16px !important;
            width: 16px !important;
            height: 16px !important;
        }
        .e886deb9 {
            display: none !important;
        }
        .cbcaa82c {
            height: 40px !important;
        }
    `;

    // 添加全局样式
    const style = document.createElement('style');
    style.textContent = globalStyles;
    document.head.appendChild(style);

    // 监听DOM变化
    const observer = new MutationObserver(function(mutations) {
        mutations.forEach(function(mutation) {
            if (mutation.type === 'childList') {
                // 检查是否有新元素被添加到DOM中
                mutation.addedNodes.forEach(function(node) {
                    if (node.nodeType === 1) { // 确保是元素节点
                        // 重新应用样式
                        const elements = {
                            be88ba8a: node.querySelector('.be88ba8a'),
                            f8d1e4c0: node.querySelector('.f8d1e4c0'),
                            d8ed659a: node.querySelector('.d8ed659a'),
                            dsIcons: node.querySelectorAll('.ds-icon'),
                            e886deb9: node.querySelector('.e886deb9'),
                            cbcaa82c: node.querySelector('.cbcaa82c')
                        };

                        if (elements.e886deb9) {
                            elements.e886deb9.remove();
                            console.log('开启新对话已移除');
                        }
                    }
                });
            }
        });
    });

    // 开始观察DOM变化
    observer.observe(document.body, {
        childList: true,
        subtree: true
    });

})();