ChatGPT Auto Scroll to Bottom

Automatically keeps ChatGPT page scrolled to the bottom

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 or Violentmonkey 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!)

Author
马牛逼(Felix)
Daily installs
0
Total installs
7
Ratings
0 0 0
Version
1.0
Created
2025-09-08
Updated
2025-09-08
Size
794 Bytes
License
GPL-v3
Applies to

ChatGPT Auto Scroll to Bottom

A Tampermonkey userscript that automatically keeps the ChatGPT page (chat.openai.com and chatgpt.com) scrolled to the bottom whenever new messages appear.

Features

  • Auto-scroll to bottom: Always follows the latest messages when new content loads.
  • Smart detection: Only scrolls if you are already at the bottom, so it won’t interrupt you when reading older messages.
  • Lightweight: Uses native MutationObserver, no extra dependencies.

Installation

  1. Install Tampermonkey or a compatible userscript manager.
  2. Create a new script and paste in the following code:
   // ==UserScript==
   // @name         ChatGPT Auto Scroll to Bottom
   // @namespace    http://tampermonkey.net/
   // @version      1.0
   // @description  Automatically keeps ChatGPT page scrolled to the bottom
   // @match        https://chat.openai.com/*
   // @match        https://chatgpt.com/*
   // @grant        none
   // ==/UserScript==

   (function() {
       'use strict';

       function isAtBottom() {
           return Math.abs(window.innerHeight + window.scrollY - document.body.scrollHeight) < 5;
       }

       const observer = new MutationObserver(() => {
           if (isAtBottom()) {
               window.scrollTo({ top: document.body.scrollHeight, behavior: 'smooth' });
           }
       });

       observer.observe(document.body, {
           childList: true,
           subtree: true
       });
   })();
  1. Save and enable the script.
  2. Open ChatGPT or chatgpt.com — when new messages arrive, the page will automatically scroll to the bottom.

Usage

  • If you’re reading older messages, the script will not force scrolling, so you won’t lose your place.
  • If you want always force scroll to bottom regardless, just remove:
  if (isAtBottom()) { ... }

Future improvements

  • Add a toggle button in the bottom-right corner to switch between Auto-scroll and Manual mode.
  • Allow custom scroll speed and detection threshold.