Greasy Fork

来自缓存

Greasy Fork is available in English.

强制对话消息气泡全宽 chatglm.cn

Override max-width style for specific elements on chatglm.cn

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         强制对话消息气泡全宽 chatglm.cn
// @namespace    http://tampermonkey.net/
// @version      0.5
// @description  Override max-width style for specific elements on chatglm.cn
// @author       You
// @match        https://chatglm.cn/*
// @grant        none
// @license MIT
// ==/UserScript==

(function() {
    'use strict';
    // 创建一个新的style元素
    var style = document.createElement('style');
    // 设置style元素的文本内容,覆盖所有.maxWidth类和.init-page.pc的直接子元素中类名为warp的max-width样式
    style.textContent = `
        .maxWidth,
        .wrap,
        .warp,
        .conversation-list,
        .conversation-item{
            max-width: unset !important;
        }
        svg,
        #wm_div_id{
            opacity: 0;
        }
        .detail-container{
          min-width: unset !important;
        }
    `;
    // 将style元素插入到head中
    document.head.appendChild(style);
})();