Wider Gemini (v2.1)

Widen the display area of the Gemini web version.

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         Wider Gemini (v2.1)
// @name:zh-CN   加宽 Gemini (v2.1)
// @namespace    http://tampermonkey.net/
// @version      2.1
// @description  Widen the display area of the Gemini web version.
// @description:zh-CN  加宽 Gemini 网页版显示区域。
// @author       dean
// @match        https://gemini.google.com/*
// @grant        GM_addStyle
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';

    // --- 在这里自定义你想要的宽度 ---
    const newMaxWidth = '1800px'; // 你可以改成 '85%', '2000px' 等

    // 针对 Gemini 当前结构的 CSS 选择器
    const customCSS = `
        /* 主要内容区域的容器 */
        mat-sidenav-content, .main-content {
            max-width: ${newMaxWidth} !important;
        }

        /* 聊天记录的直接容器 */
        .conversation-container {
            max-width: ${newMaxWidth} !important;
        }
    `;

    // 注入样式
    try {
        GM_addStyle(customCSS);
        console.log('Wider Gemini styles applied successfully.');
    } catch (e) {
        console.error('Wider Gemini script failed to apply styles:', e);
    }
})();