DeepSeek Prevent Autofocus

Blocks programmatic autofocus on chat.deepseek.com

  1. // ==UserScript==
  2. // @name DeepSeek Prevent Autofocus
  3. // @description Blocks programmatic autofocus on chat.deepseek.com
  4. // @match https://chat.deepseek.com/*
  5. // @run-at document-start
  6. // @version 0.0.1.20250511172942
  7. // @namespace https://greasyfork.org/users/1435046
  8. // ==/UserScript==
  9.  
  10. (function() {
  11. 'use strict';
  12.  
  13. // Override focus for textareas to prevent auto-focus behavior
  14. const originalDescriptor = Object.getOwnPropertyDescriptor(HTMLElement.prototype, 'focus');
  15. HTMLElement.prototype.focus = function(...args) {
  16. if (this.tagName === 'TEXTAREA') return;
  17. return originalDescriptor.value.apply(this, args);
  18. };
  19. })();