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

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

// ==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);
})();