Greasy Fork is available in English.
Block auto-scroll in DeepSeek while keeping manual scroll control
当前为
// ==UserScript==
// @name DeepSeek No Auto-Scroll
// @description Block auto-scroll in DeepSeek while keeping manual scroll control
// @match *://*.deepseek.com/*
// @version 0.0.1.20250316192637
// @namespace http://greasyfork.icu/users/1435046
// ==/UserScript==
(function() {
'use strict';
const blockScroll = el => {
Object.defineProperty(el, 'scrollTop', {
set: () => {},
get: () => el._realScroll || 0,
configurable: true
});
el.addEventListener('scroll', () => el._realScroll = el.scrollTop);
};
// Apply to existing elements
document.querySelectorAll('*').forEach(blockScroll);
// Watch for new elements
new MutationObserver(muts => {
muts.forEach(m => [...m.addedNodes]
.filter(n => n.nodeType === 1)
.forEach(blockScroll)
);
}).observe(document.documentElement, { subtree: true, childList: true });
})();