HuagnQS常用的宽屏整合

自动识别网站并应用对应的宽屏和样式优化

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         HuagnQS常用的宽屏整合
// @namespace    http://tampermonkey.net/
// @version      1.2.2
// @description  自动识别网站并应用对应的宽屏和样式优化
// @author       YourName
// @match        *://*.kimi.com/*
// @match        *://*.deepseek.com/*
// @match        https://www.zhihu.com/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    const host = window.location.hostname;
    let css = '';

    // --- 1. Kimi 逻辑 ---
    if (host.includes('kimi')) {
      
 css = `
            body, code {
                font-family: "JetBrains Mono NL", Consolas, "Microsoft YaHei", "PingFang SC", "WenQuanYi Micro Hei", ui-monospace, Menlo, Monaco, "Cascadia Mono", monospace !important;
            }
            .toolcall-content { max-height: 100% !important; }
            .chat-content-list { max-width: 95% !important; }
        `;
    }

    // --- 2. DeepSeek 逻辑 ---
    else if (host.includes('deepseek.com')) {
        css = `
            :root { --message-list-max-width: 95% !important; }
            .ds-chat-main { max-width: 95% !important; }
        `;
    }

    // --- 3. 知乎 逻辑 ---
    else if (host.includes('zhihu.com')) {
        css = `
            /* 隐藏右侧边栏 (包含指定的多个 class) */
            .Question-sideColumn.Question-sideColumn--sticky.css-1qyytj7 {
                display: none !important;
            }

            /* 配置主容器宽度变量为 80vw */
            .Question-main {
                --app-width: 80vw !important;
            }

            /* 配置内容列宽度为 100% */
            .Question-mainColumn {
                width: 100% !important;
            }

            /* 可选:如果你希望回答页面的内容也变宽,可以取消下面注释 */
            /* .QuestionHeader-footer-inner, .QuestionHeader-content { width: 80vw !important; max-width: none !important; } */
        `;
    }

    // --- 统一注入样式 ---
    if (css) {
        const style = document.createElement('style');
        style.setAttribute('type', 'text/css');
        style.textContent = css;
        document.head.appendChild(style);
        console.log(`[宽屏脚本] 已为 ${host} 应用自定义样式`);
    }
})();