DeepSeek No Auto-Scroll

Block auto-scroll in DeepSeek while keeping manual scroll control

目前为 2025-02-16 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name DeepSeek No Auto-Scroll
  3. // @version 1.0
  4. // @description Block auto-scroll in DeepSeek while keeping manual scroll control
  5. // @author You
  6. // @match *://*.deepseek.com/*
  7. // @grant none
  8. // @license MIT
  9. // @namespace https://greasyfork.org/users/1435046
  10. // ==/UserScript==
  11.  
  12. (function() {
  13. 'use strict';
  14.  
  15. // Target the specific scroll container
  16. const scrollContainer = document.querySelector('div.f6004764');
  17. if (!scrollContainer) return; // Exit if container not found
  18.  
  19. // Block auto-scroll attempts while keeping manual control
  20. Object.defineProperty(scrollContainer, 'scrollTop', {
  21. set: function() {}, // Empty setter blocks programmatic scroll
  22. get: () => scrollContainer._realScrollTop || 0, // Preserve actual position
  23. configurable: true
  24. });
  25.  
  26. // Store real scroll position
  27. scrollContainer.addEventListener('scroll', () => {
  28. scrollContainer._realScrollTop = scrollContainer.scrollTop;
  29. });
  30. })();