Resizable Textarea from prompts and negative promts

Hacer que el textarea de prompts y negative prompts redimensionables uwu

  1. // ==UserScript==
  2. // @name Resizable Textarea from prompts and negative promts
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @description Hacer que el textarea de prompts y negative prompts redimensionables uwu
  6. // @author Abejita
  7. // @match https://pixai.art/generator/image
  8. // @match https://pixai.art/*
  9. // @grant none
  10. // @license MIT
  11. // ==/UserScript==
  12. (function() {
  13. 'use strict';
  14. function makeResizableVertical(selector, maxHeight) {
  15. const checkExist = setInterval(function() {
  16. const elements = document.querySelectorAll(selector);
  17. if (elements.length > 0) {
  18. elements.forEach(el => {
  19. el.style.resize = 'vertical';
  20. el.style.overflow = 'auto';
  21. el.style.maxHeight = maxHeight;
  22. });
  23. clearInterval(checkExist);
  24. }
  25. }, 100);
  26. setTimeout(function() {
  27. clearInterval(checkExist);
  28. }, 10000);
  29. }
  30. window.addEventListener('load', function() {
  31. makeResizableVertical('.sc-iTFTee.sc-dwnOUR.lfbXAG.iIeQrX.MuiInputBase-input.MuiOutlinedInput-input.MuiInputBase-inputMultiline', '300px');
  32. makeResizableVertical('textarea.w-full.min-h-\\[3em\\].max-h-\\[9em\\].dense\\:max-h-\\[5em\\].bg-transparent.outline-none.resize-none', '500px');
  33. });
  34. })();

QingJ © 2025

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