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.

Tendrás que instalar una extensión para tu navegador como Tampermonkey, Greasemonkey o Violentmonkey si quieres utilizar este script.

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

Necesitarás instalar una extensión como Tampermonkey o Violentmonkey para instalar este script.

Necesitarás instalar una extensión como Tampermonkey o Userscripts para instalar este script.

Necesitará instalar una extensión como Tampermonkey para instalar este script.

Necesitarás instalar una extensión para administrar scripts de usuario si quieres instalar este script.

(Ya tengo un administrador de scripts de usuario, déjame instalarlo)

Necesitará instalar una extensión como Stylus para instalar este estilo.

Necesitará instalar una extensión como Stylus para instalar este estilo.

Necesitará instalar una extensión como Stylus para instalar este estilo.

Necesitará instalar una extensión del gestor de estilos de usuario para instalar este estilo.

Necesitará instalar una extensión del gestor de estilos de usuario para instalar este estilo.

Necesitará instalar una extensión del gestor de estilos de usuario para instalar este estilo.

(Ya tengo un administrador de estilos de usuario, déjame instalarlo)

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