您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
openai样式美化
- // ==UserScript==
- // @name publink-openai-beautify
- // @namespace http://tampermonkey.net/
- // @version 0.01
- // @description openai样式美化
- // @author huangbc
- // @include *://*
- // @license MIT
- // @icon https://www.google.com/s2/favicons?sz=64&domain=shb.ltd
- // @grant none
- // ==/UserScript==
- (function() {
- 'use strict';
- let styleElement = document.createElement('style')
- styleElement.textContent = `nav > a.items-center:nth-of-type(2) { display: none; }`
- let scriptElement = document.createElement('script')
- scriptElement.textContent = `
- function setTextareaHeight() {
- let isOpenAI = window.location.host == "chat.openai.com"
- if (!isOpenAI) {
- return;
- }
- let textElement = document.querySelector('textarea');
- textElement.addEventListener('focus', function(event) {
- const element = event.target;
- element.style.minHeight = '200px';
- })
- textElement.addEventListener('blur', function() {
- const element = event.target;
- element.style.minHeight = '0px';
- })
- }
- window.onload = () => {
- setTimeout(() => {
- setTextareaHeight();
- }, 2000);
- }
- `
- // document.body.append(scriptElement)
- document.body.append(styleElement)
- // Your code here...
- })();