Auto Continue Generating in ChatGPT

Auto Continue Generating in ChatGPT (only the necessary code)

  1. // ==UserScript==
  2. // @name Auto Continue Generating in ChatGPT
  3. // @namespace Auto Continue Generating in ChatGPT
  4. // @version 1.3
  5. // @author Nameniok
  6. // @description Auto Continue Generating in ChatGPT (only the necessary code)
  7. // @run-at document-idle
  8. // @match https://chat.openai.com/*
  9. // @license MIT
  10. // ==/UserScript==
  11.  
  12. let AutoContinueButton;
  13. (async () => {
  14. if (!AutoContinueButton) {
  15. AutoContinueButton = new MutationObserver(mutations =>
  16. mutations.forEach(mutation => {
  17. if (mutation.attributeName == 'style' && mutation.target.style.opacity == '1') {
  18. document.querySelectorAll('button').forEach(button => {
  19. if (button.textContent.includes('Continue generating')) {
  20. button.click();
  21. } else if (button.classList.contains('btn') && button.classList.contains('relative') && button.classList.contains('btn-neutral') && button.classList.contains('whitespace-nowrap') && button.classList.contains('border-0') && button.classList.contains('md:border')) {
  22. button.click();
  23. }
  24. });
  25. }
  26. })
  27. );
  28. AutoContinueButton.observe(document.querySelector('main'), { attributes: true, subtree: true });
  29. }
  30. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址