ChatGPT Scroll Fixer

Automatically set overflowY:auto for scrollable elements in ChatGPT, including Project interface

// ==UserScript==
// @name         ChatGPT Scroll Fixer
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  Automatically set overflowY:auto for scrollable elements in ChatGPT, including Project interface
// @author       You
// @match        https://chatgpt.com/*
// @icon         https://chatgpt.com/favicon.ico
// @grant        none
// @license MIT
// ==/UserScript==

(function() {
    'use strict';

    // Run once on page load
    function fixScrollableElements() {
        document.querySelectorAll('*').forEach(el => {
            if (el.scrollHeight > el.clientHeight) {
                el.style.maxHeight = 'none';
                el.style.overflowY = 'auto';
            }
        });
    }

    // Run initially
    fixScrollableElements();

})();
长期地址
遇到问题?请前往 GitHub 提 Issues。