ChatGPT Search Shortcut

ChatGPT Search Shortcut for Chrome Based Browsers. Create a new ChatGPT Search Engine with the URL: https://chat.openai.com/?search=%s

目前為 2023-04-25 提交的版本,檢視 最新版本

// ==UserScript==
// @name         ChatGPT Search Shortcut
// @namespace    https://gf.qytechs.cn/en/users/943407-webchantment
// @version      1.0
// @description  ChatGPT Search Shortcut for Chrome Based Browsers. Create a new ChatGPT Search Engine with the URL: https://chat.openai.com/?search=%s
// @author       Webchantment
// @match        https://chat.openai.com/?search=*
// @grant        none
// ==/UserScript==

(async () => {

	const timeout = 500; //milliseconds

	setTimeout(() => {

		const urlParams = new URLSearchParams(window.location.search);
		const searchInput = urlParams.get("search");

		const textarea = document.querySelector("form > * textarea");
		const button = document.querySelector("form > * button");

		if (searchInput && textarea && button) {
			textarea.value = searchInput;
			button.disabled = false;
			button.click();
		}

	}, timeout);

})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址