Qwen Chat: Wide Layout + Wider Scrollbar + Sticky Code Buttons

Removes max-width, stretches the chat, increases the scrollbar width, and makes the code copy buttons sticky.

// ==UserScript==
// @name         Qwen Chat: Wide Layout + Wider Scrollbar + Sticky Code Buttons
// @name:ru      Qwen Chat: Широкий макет + толстая прокрутка + липкие кнопки кода
// @namespace    http://tampermonkey.net/
// @version      1.0
// @author       a114_you
// @description     Removes max-width, stretches the chat, increases the scrollbar width, and makes the code copy buttons sticky.
// @description:ru  Убирает max-width, растягивает чат, увеличивает ширину полосы прокрутки и делает кнопки копирования кода липкими
// @match        https://chat.qwen.ai/*
// @grant        none
// @run-at       document-start
// @license MIT
// ==/UserScript==

(function(){
  'use strict';
  const css = `
    /* === 1. Убираем ограничения по ширине всей страницы === */
    html, body {
      width: 100vw !important;
      max-width: 100vw !important;
      overflow-x: hidden !important;
    }

    /* === 2. Отключаем автоматическое центрирование (mx-auto) === */
    .mx-auto {
      margin-left: 0 !important;
      margin-right: 0 !important;
    }

    /* === 3. Основная область чата: увеличиваем на всю ширину === */
    #chat-message-container,
    #chat-message-container > div,
    #messages-container {
      width: 100% !important;
      max-width: none !important; /* ← поставьте здесь нужное ограничение, например max-width:1400px */
    }

    /* === 4. Убираем боковые отступы у pane-контейнера === */
    [data-pane] {
      padding-left: 0 !important;
      padding-right: 0 !important;
    }

    /* === 5. «Прилипание» панели копирования/загрузки кода === */
    .copy.top-8 {
      position: sticky !important;
      top: 0 !important;
      background: inherit !important; /* не перекрывать фон */
      z-index: 10 !important;          /* поверх кода */
    }

    /* === 6. Скроллбар: Firefox === */
    #messages-container {
      scrollbar-width: auto !important; /* thin | auto | none */
      scrollbar-color: rgba(150,150,150,0.5) transparent !important;
    }
        /* === 7. Растягиваем поле ввода по всей ширине === */
//     .chat-message-input-textarea-container-pc,
//     .chat-message-input-container-inner,
//     #chat-input {
//       width: 100% !important;
//       max-width: none !important;
//     }

  `;
  const style = document.createElement('style');
  style.textContent = css;
  document.documentElement.appendChild(style);
})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址