您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Add a Continue button to ChatGPT
- // ==UserScript==
- // @name ChatGPT Continue Button
- // @namespace http://tampermonkey.net/
- // @version 0.3
- // @description Add a Continue button to ChatGPT
- // @author stucci
- // @license MIT
- // @match https://chat.openai.com/*
- // @grant none
- // ==/UserScript==
- (function() {
- 'use strict';
- function createButton(text, handler) {
- const button = document.createElement('button');
- button.className = 'custombtn btn relative btn-neutral border-0 md:border';
- button.innerHTML = text;
- button.onclick = handler;
- return button;
- }
- function addButtonIfNotExists() {
- if (document.querySelector('.custombtn')) {
- return;
- }
- const textBox = document.querySelector('form');
- if (!textBox) {
- return;
- }
- const buttonContainer = document.createElement('div');
- buttonContainer.style.display = 'flex';
- buttonContainer.style.justifyContent = 'center';
- buttonContainer.style.marginBottom = '10px';
- buttonContainer.append(
- createButton('Continue⏎', function() {
- const textArea = document.querySelector('textarea');
- textArea.value = 'Continue';
- textArea.focus();
- const disabledButtons = document.querySelectorAll("button[disabled]");
- const lastDisabledButton = disabledButtons[disabledButtons.length - 1];
- lastDisabledButton.removeAttribute("disabled");
- if (lastDisabledButton) {
- lastDisabledButton.click();
- }
- })
- );
- textBox.parentNode.insertBefore(buttonContainer, textBox);
- }
- const targetNode = document.body;
- const config = { childList: true, subtree: true };
- const observer = new MutationObserver(addButtonIfNotExists);
- observer.observe(targetNode, config);
- })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址