Grok Code Style

Shrink and style pre/code blocks on Grok pages only

Från och med 2025-03-15. Se den senaste versionen.

// ==UserScript==
// @name         Grok Code Style
// @namespace    http://tampermonkey.net/
// @version      1.2
// @description  Shrink and style pre/code blocks on Grok pages only
// @author       You
// @match        https://x.com/i/grok*
// @match        https://grok.com/*
// @match        https://grok.x.ai/*
// @match        https://x.ai/*
// @exclude      https://greasyforks.org/*
// @exclude      https://*.org/*
// @grant        GM_addStyle
// @license      MIT
// ==/UserScript==

GM_addStyle(`
    :not([class*="highlight"]:not([id*="highlight"])) > pre,
    :not([class*="highlight"]:not([id*="highlight"])) > code {
        max-height: 150px;
        overflow-y: auto;
        font-size: 11px;
        line-height: 1.2;
        background-color: #f5f5f5;
        padding: 4px;
        border: 1px solid #ddd;
        margin: 0;
        display: block;
    }
`);
长期地址
遇到问题?请前往 GitHub 提 Issues。