press the single [Continue] button instead of having to repeatedly click and type 'Add message > continue > Enter' to continue GPT's output
当前为
// ==UserScript==
// @name OpenAI Playground (ChatGPT) - Continue Button
// @namespace https://greasyfork.org/en/users/10118-drhouse
// @version 1.0
// @description press the single [Continue] button instead of having to repeatedly click and type 'Add message > continue > Enter' to continue GPT's output
// @include https://platform.openai.com/playground?mode*
// @require http://code.jquery.com/jquery-3.4.1.min.js
// @require https://cdnjs.cloudflare.com/ajax/libs/babel-standalone/6.18.2/babel.js
// @require https://cdnjs.cloudflare.com/ajax/libs/babel-polyfill/6.16.0/polyfill.js
// @author drhouse
// @license CC-BY-NC-SA-4.0
// @icon https://www.google.com/s2/favicons?sz=64&domain=openai.com
// ==/UserScript==
/* global jQuery, $ */
this.$ = this.jQuery = jQuery.noConflict(true);
(function($){
setTimeout(function(){
var path = "#root > div.route-container > div > div.pg-root.page-body.full-width.flush > div > div.pg-body > div.pg-editor > div > div > div.chat-pg-right-wrapper > div.chat-pg-footer > span > button.btn.btn-sm.btn-minimal.btn-neutral"
$('<button id="continue" tabindex="0" class="btn btn-sm btn-filled btn-primary" type="button" data-testid="pg-submit-btn" aria-haspopup="true" aria-expanded="false"><span class="btn-label-wrap"><span class="btn-label-inner">Continue‍</span></span></button>').insertAfter(path)
$("button[id='continue']").click(function(){
$("#root > div.route-container > div > div.pg-root.page-body.full-width.flush > div > div.pg-body > div.pg-editor > div > div > div.chat-pg-right-wrapper > div.chat-pg-panel-wrapper > div > div > div.chat-pg-message.add-message")[0].click()
setTimeout(function(){
$("#root > div.route-container > div > div.pg-root.page-body.full-width.flush > div > div.pg-body > div.pg-editor > div > div > div.chat-pg-right-wrapper > div.chat-pg-panel-wrapper > div > div > div:nth-child(3) > div.text-input-with-focus > textarea").text('continue')
}, 500);
setTimeout(function(){
$("#root > div.route-container > div > div.pg-root.page-body.full-width.flush > div > div.pg-body > div.pg-editor > div > div > div.chat-pg-right-wrapper > div.chat-pg-footer > span > button:nth-child(1)")[0].click()
}, 1000);
});
}, 1000);
})(jQuery);