Greasy Fork is available in English.

ChatGPT Continue Button

Makes the send button type continue and submit it if there is nothing in the textarea

  1. // ==UserScript==
  2. // @name ChatGPT Continue Button
  3. // @version 0.3.1
  4. // @description Makes the send button type continue and submit it if there is nothing in the textarea
  5. // @author ChatGPT with a little help
  6. // @match https://chat.openai.com/chat
  7. // @grant none
  8. // @license MIT License (https://opensource.org/licenses/MIT)
  9. // @namespace http://tampermonkey.net/
  10. // ==/UserScript==
  11.  
  12. (function() {
  13. 'use strict';
  14.  
  15. // find the textarea where the user types messages
  16. const textarea = document.querySelector("textarea");
  17. const btn = textarea.nextElementSibling;
  18.  
  19. btn.addEventListener('click', function() {
  20. // when the button is clicked, if there is nothing in the textarea,
  21. // type "continue" into the textarea and submit it
  22. if (textarea.value === '') {
  23. textarea.value = 'continue';
  24. textarea.form.dispatchEvent(new Event('submit', { cancelable: true }));
  25. }
  26. });
  27. })();