Resizable Textarea from prompts and negative promts

Hacer que el textarea de prompts y negative prompts redimensionables uwu

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         Resizable Textarea from prompts and negative promts
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Hacer que el textarea de prompts y negative prompts redimensionables uwu
// @author       Abejita
// @match        https://pixai.art/generator/image
// @match        https://pixai.art/*
// @grant        none
// @license MIT
// ==/UserScript==
(function() {
    'use strict';
    function makeResizableVertical(selector, maxHeight) {
        const checkExist = setInterval(function() {
            const elements = document.querySelectorAll(selector);
            if (elements.length > 0) {
                elements.forEach(el => {
                    el.style.resize = 'vertical';
                    el.style.overflow = 'auto';
                    el.style.maxHeight = maxHeight;
                });
                clearInterval(checkExist);
            }
        }, 100);
        setTimeout(function() {
            clearInterval(checkExist);
        }, 10000);
    }
   window.addEventListener('load', function() {
        makeResizableVertical('.sc-iTFTee.sc-dwnOUR.lfbXAG.iIeQrX.MuiInputBase-input.MuiOutlinedInput-input.MuiInputBase-inputMultiline', '300px');
        makeResizableVertical('textarea.w-full.min-h-\\[3em\\].max-h-\\[9em\\].dense\\:max-h-\\[5em\\].bg-transparent.outline-none.resize-none', '500px');
    });
})();