ChatGPT Auto-Continue (September 2024)

Updated September 2024. Fun fact: Written 99% by ChatGPT.

  1. // ==UserScript==
  2. // @name ChatGPT Auto-Continue (September 2024)
  3. // @version 1.0
  4. // @description Updated September 2024. Fun fact: Written 99% by ChatGPT.
  5. // @author ∫(Ace)³dx [Technically ChatGPT though]
  6. // @match https://chatgpt.com/c/*
  7. // @icon https://cdn-icons-png.flaticon.com/512/6471/6471695.png
  8. // @license MIT
  9. // @grant none
  10. // @namespace https://greasyfork.org/users/449798
  11. // ==/UserScript==
  12.  
  13. // Function to check for the button and click it if found
  14. function checkAndClickButton() {
  15. try {
  16. // Evaluate the XPath expression
  17. let xpath = '/html/body/div[1]/div[2]/main/div[1]/div[2]/div/div[1]/div/form/div/div[1]/div/div/div/div/button';
  18. let result = document.evaluate(xpath, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null);
  19. let button = result.singleNodeValue;
  20.  
  21. // If the button is found, click it
  22. if (button) {
  23. button.click();
  24. console.log('Button clicked!');
  25. }
  26. } catch (error) {
  27. console.error('Error checking or clicking the button:', error);
  28. }
  29. }
  30.  
  31. // Set an interval to check every 500 milliseconds
  32. setInterval(checkAndClickButton, 500);