您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Re-enabled the ChatGPT chatbox under Firefox
// ==UserScript== // @name Firefox/ChatGPT: Fix Disabled Chat Box // @namespace https://greasyfork.org/en/users/1337417-mevanlc // @version 0.3 // @description Re-enabled the ChatGPT chatbox under Firefox // @author https://greasyfork.org/en/users/1337417-mevanlc // @match https://chatgpt.com/* // @grant none // @license MIT // ==/UserScript== (function() { 'use strict'; function userscriptMain() { let parent = getChatBoxParent(); if (!parent) { ulog(`chatbox parent not found, setting poll timer`); setTimeout(userscriptMain, 150); } else { onGetChatBoxParent(parent); } } function getChatBoxParent() { const child = document.querySelector("#prompt-textarea"); return child ? child.parentElement : null; } function onGetChatBoxParent(parent) { parent.classList.remove('default-browser'); parent.classList.add('firefox'); ulog('Chatbox enabled by changing classes.'); } if (document.readyState !== 'loading') { ulog('document is already ready, calling userscript()'); userscriptMain(); } else { ulog('will run userscript() on DOMContentLoaded'); document.addEventListener('DOMContentLoaded', userscriptMain); } function ulog(...args) { typeof args[0] === 'string' ? console.log(`${GM.info.script.name}: ${args[0]}`, ...args.slice(1)) : console.log(GM.info.script.name, ...args); } })();