Claude No Auto-Scroll

claude no scroll

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

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.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name        Claude No Auto-Scroll
// @description claude no scroll
// @match       https://claude.ai/*
// @version 0.0.1.20250316174259
// @namespace https://greasyfork.org/users/1435046
// ==/UserScript==

function disableElementAutoScroll(element) {
    // Remove any forced heights
    element.style.minHeight = 'auto';
    element.style.height = 'auto';
    
    // Disable scroll-into-view behavior
    element.scrollIntoView = () => {};
}

// Process existing messages
document.querySelectorAll('.group.relative').forEach(disableElementAutoScroll);

// Watch for new messages
new MutationObserver((mutations) => {
    mutations.forEach(({ addedNodes }) => {
        addedNodes.forEach(node => {
            if(node.nodeType === 1 && node.matches('.group.relative')) {
                disableElementAutoScroll(node);
            }
        });
    });
}).observe(document.body, {
    childList: true,
    subtree: true
});