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.

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