Keep ChatGPT Alive 保持ChatGPT一直有效

Keeps ChatGPT responsive by automatically inputting a question every x minutes

Tính đến 01-02-2023. Xem phiên bản mới nhất.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

Bạn sẽ cần cài đặt một tiện ích mở rộng như Tampermonkey hoặc Violentmonkey để cài đặt kịch bản này.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(Tôi đã có Trình quản lý tập lệnh người dùng, hãy cài đặt nó!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         Keep ChatGPT Alive 保持ChatGPT一直有效
// @namespace    https://github.com/new4u
// @version      0.3
// @description  Keeps ChatGPT responsive by automatically inputting a question every x minutes
// @author       new4u本爷有空
// @match        https://chat.openai.com/*
// @grant        none
// @copyright    2015-2022, new4u
// @license      GPL-3.0-only
// ==/UserScript==

(function () {
  'use strict';

  setInterval(function () {
    // input a question into the chat box
    const textarea = document.querySelector("textarea");
    textarea.value = "继续";
    textarea.dispatchEvent(new KeyboardEvent("keydown", {
      bubbles: true,
      cancelable: true,
      key: "Enter",
      code: "Enter",
      keyCode: 13
    }));
  }, 120000); // input a question every 1 minutes (1 minutes * 60 seconds/minute * 1000 milliseconds/second)
})();