// ==UserScript==
// @name My Prompt
// @name:pt-BR Meu Prompt
// @name:zh-CN 我的提示词
// @name:zh-TW 我的提示詞
// @name:fr-CA Mon Prompt
// @name:ckb پڕۆمپتەکەم
// @name:ar مُوجِّهي
// @name:be Мой запыт
// @name:bg Моята подкана
// @name:cs Můj pokyn
// @name:da Min prompt
// @name:de Mein Prompt
// @name:el Η προτροπή μου
// @name:en My Prompt
// @name:eo Mia instigo
// @name:es Mi Prompt
// @name:fi Kehotteeni
// @name:fr Mon Prompt
// @name:he ההנחיה שלי
// @name:hr Moja uputa
// @name:hu Promptom
// @name:id Prompt Saya
// @name:it Il mio Prompt
// @name:ja マイプロンプト
// @name:ka ჩემი პრომპტი
// @name:ko 나의 프롬프트
// @name:mr माझी सूचना
// @name:nb Min prompt
// @name:nl Mijn Prompt
// @name:pl Mój Prompt
// @name:ro Prompt-ul meu
// @name:ru Мой Промпт
// @name:sk Môj pokyn
// @name:sr Мој упит
// @name:sv Min prompt
// @name:th พรอมต์ของฉัน
// @name:tr İstemim
// @name:uk Мій запит
// @name:ug مېنىڭ پرومپتۇم
// @name:vi Lời nhắc của tôi
// @namespace https://github.com/0H4S
// @version 3.4
// @description Save and use your personalized prompts in your own library. Use Dynamic Prompt mode to insert interactive information and adapt commands as needed. Attach and reuse files anytime without reselections. Compatible with: ChatGPT, Gemini, DeepSeek, Google AI Studio, NotebookLM, Doubao, Claude, Kimi, Qwen, Grok, Mistral, LMArena, LongCat, Z.AI, Perplexity, Poe, Tencent Yuanbao, ChatGLM, and Google AI Mode.
// @description:pt-BR Salve e use seus prompts personalizados na sua própria biblioteca de prompts. Use o modo Prompt Dinâmico para inserir informações interativas e adaptar comandos conforme sua necessidade. Anexe e use arquivos sempre que quiser, sem precisar selecionar tudo de novo. Compatível com: ChatGPT, Gemini, DeepSeek, Google AI Studio, NotebookLM, Doubao, Claude, Kimi, Qwen, Grok, Mistral, LMArena, LongCat, Z.AI, Perplexity, Poe, Tencent Yuanbao, ChatGLM e Google Modo IA.
// @description:zh-CN 保存并在您自己的库中使用自定义提示词。使用动态提示词模式插入交互信息并根据需要调整指令。随时附加和使用文件,无需重新选择。兼容:ChatGPT, Gemini, DeepSeek, Google AI Studio, NotebookLM, Doubao, Claude, Kimi, Qwen, Grok, Mistral, LMArena, LongCat, Z.AI, Perplexity, Poe, 腾讯元宝, ChatGLM, Google AI Mode。
// @description:zh-TW 儲存並在您自己的資料庫中使用自訂提示詞。使用動態提示詞模式插入互動資訊並根據需要調整指令。隨時附加和使用檔案,無需重新選取。相容於:ChatGPT, Gemini, DeepSeek, Google AI Studio, NotebookLM, Doubao, Claude, Kimi, Qwen, Grok, Mistral, LMArena, LongCat, Z.AI, Perplexity, Poe, 騰訊元寶, ChatGLM, Google AI Mode。
// @description:fr-CA Sauvegardez et utilisez vos prompts personnalisés dans votre bibliothèque. Utilisez le mode Prompt Dynamique pour insérer des informations interactives et adapter les commandes. Joignez et réutilisez des fichiers à tout moment sans resélection. Compatible avec : ChatGPT, Gemini, DeepSeek, Google AI Studio, NotebookLM, Doubao, Claude, Kimi, Qwen, Grok, Mistral, LMArena, LongCat, Z.AI, Perplexity, Poe, Tencent Yuanbao, ChatGLM, Google AI Mode.
// @description:ckb پرۆمپتە تایبەتەکانت لە کتێبخانەی خۆتدا پاشەکەوت بکە و بەکاریان بهێنە. دۆخی پرۆمپتی داینامیکی بەکاربهێنە بۆ تێکردنی زانیاری کارلێککارانە و گونجاندنی فەرمانەکان بەپێی پێویست. فایلەکان لە هەر کاتێکدا لکێنە و بەکاریان بهێنەوە بەبێ هەڵبژاردنەوە. گونجاوە لەگەڵ: ChatGPT, Gemini, DeepSeek, Google AI Studio, NotebookLM, Doubao, Claude, Kimi, Qwen, Grok, Mistral, LMArena, LongCat, Z.AI, Perplexity, Poe, Tencent Yuanbao, ChatGLM, Google AI Mode.
// @description:ar احفظ واستخدم مطالباتك المخصصة في مكتبتك الخاصة. استخدم وضع المطالبة الديناميكية (Dynamic Prompt) لإدراج معلومات تفاعلية وتكييف الأوامر حسب الحاجة. أرفق الملفات واستخدمها في أي وقت دون الحاجة إلى إعادة التحديد. متوافق مع: ChatGPT, Gemini, DeepSeek, Google AI Studio, NotebookLM, Doubao, Claude, Kimi, Qwen, Grok, Mistral, LMArena, LongCat, Z.AI, Perplexity, Poe, Tencent Yuanbao, ChatGLM, Google AI Mode.
// @description:be Захоўвайце і выкарыстоўвайце свае персаналізаваныя падказкі ў уласнай бібліятэцы. Выкарыстоўвайце рэжым Dynamic Prompt для ўстаўкі інтэрактыўнай інфармацыі і адаптацыі каманд па меры неабходнасці. Далучайце і выкарыстоўвайце файлы ў любы час без паўторнага выбару. Сумяшчальна з: ChatGPT, Gemini, DeepSeek, Google AI Studio, NotebookLM, Doubao, Claude, Kimi, Qwen, Grok, Mistral, LMArena, LongCat, Z.AI, Perplexity, Poe, Tencent Yuanbao, ChatGLM, Google AI Mode.
// @description:bg Запазете и използвайте вашите персонализирани подкани (prompts) в собствената си библиотека. Използвайте режима Dynamic Prompt за вмъкване на интерактивна информация и адаптиране на командите. Прикачвайте и използвайте файлове по всяко време без повторен избор. Съвместим с: ChatGPT, Gemini, DeepSeek, Google AI Studio, NotebookLM, Doubao, Claude, Kimi, Qwen, Grok, Mistral, LMArena, LongCat, Z.AI, Perplexity, Poe, Tencent Yuanbao, ChatGLM, Google AI Mode.
// @description:cs Ukládejte a používejte své přizpůsobené prompty ve vlastní knihovně. Použijte režim Dynamic Prompt pro vkládání interaktivních informací a přizpůsobení příkazů podle potřeby. Připojujte a používejte soubory kdykoli bez nutnosti nového výběru. Kompatibilní s: ChatGPT, Gemini, DeepSeek, Google AI Studio, NotebookLM, Doubao, Claude, Kimi, Qwen, Grok, Mistral, LMArena, LongCat, Z.AI, Perplexity, Poe, Tencent Yuanbao, ChatGLM, Google AI Mode.
// @description:da Gem og brug dine personlige prompts i dit eget bibliotek. Brug Dynamic Prompt-tilstand til at indsætte interaktiv information og tilpasse kommandoer efter behov. Vedhæft og brug filer når som helst uden at skulle vælge dem igen. Kompatibel med: ChatGPT, Gemini, DeepSeek, Google AI Studio, NotebookLM, Doubao, Claude, Kimi, Qwen, Grok, Mistral, LMArena, LongCat, Z.AI, Perplexity, Poe, Tencent Yuanbao, ChatGLM, Google AI Mode.
// @description:de Speichern und verwenden Sie Ihre personalisierten Prompts in Ihrer eigenen Bibliothek. Nutzen Sie den Dynamic Prompt-Modus, um interaktive Informationen einzufügen und Befehle anzupassen. Hängen Sie Dateien jederzeit an und verwenden Sie sie wieder, ohne sie erneut auswählen zu müssen. Kompatibel mit: ChatGPT, Gemini, DeepSeek, Google AI Studio, NotebookLM, Doubao, Claude, Kimi, Qwen, Grok, Mistral, LMArena, LongCat, Z.AI, Perplexity, Poe, Tencent Yuanbao, ChatGLM, Google AI Mode.
// @description:el Αποθηκεύστε και χρησιμοποιήστε τις εξατομικευμένες προτροπές σας στη δική σας βιβλιοθήκη. Χρησιμοποιήστε τη λειτουργία Dynamic Prompt για να εισάγετε διαδραστικές πληροφορίες και να προσαρμόσετε τις εντολές ανάλογα με τις ανάγκες σας. Επισυνάψτε και χρησιμοποιήστε αρχεία ανά πάσα στιγμή χωρίς εκ νέου επιλογή. Συμβατό με: ChatGPT, Gemini, DeepSeek, Google AI Studio, NotebookLM, Doubao, Claude, Kimi, Qwen, Grok, Mistral, LMArena, LongCat, Z.AI, Perplexity, Poe, Tencent Yuanbao, ChatGLM, Google AI
// @description:en Save and use your personalized prompts in your own library. Use Dynamic Prompt mode to insert interactive information and adapt commands as needed. Attach and reuse files anytime without reselections. Compatible with: ChatGPT, Gemini, DeepSeek, Google AI Studio, NotebookLM, Doubao, Claude, Kimi, Qwen, Grok, Mistral, LMArena, LongCat, Z.AI, Perplexity, Poe, Tencent Yuanbao, ChatGLM, and Google AI Mode.
// @description:eo Konservu kaj uzu viajn personigitajn invitojn en via propra biblioteko. Uzu la reĝimon Dinamika Invito por enmeti interagajn informojn kaj adapti ordonojn laŭbezone. Aldonu kaj uzu dosierojn iam ajn sen reelekto. Kongrua kun: ChatGPT, Gemini, DeepSeek, Google AI Studio, NotebookLM, Doubao, Claude, Kimi, Qwen, Grok, Mistral, LMArena, LongCat, Z.AI, Perplexity, Poe, Tencent Yuanbao, ChatGLM, Google AI Mode.
// @description:es Guarde y utilice sus prompts personalizados en su propia biblioteca. Use el modo Prompt Dinámico para insertar información interactiva y adaptar comandos según sus necesidades. Adjunte y reutilice archivos en cualquier momento sin tener que volver a seleccionarlos. Compatible con: ChatGPT, Gemini, DeepSeek, Google AI Studio, NotebookLM, Doubao, Claude, Kimi, Qwen, Grok, Mistral, LMArena, LongCat, Z.AI, Perplexity, Poe, Tencent Yuanbao, ChatGLM, Google AI Mode.
// @description:fi Tallenna ja käytä mukautettuja kehotteita omassa kirjastossasi. Käytä Dynamic Prompt -tilaa interaktiivisten tietojen lisäämiseen ja komentojen mukauttamiseen tarpeen mukaan. Liitä ja käytä tiedostoja milloin tahansa ilman uudelleenvalintaa. Yhteensopiva seuraavien kanssa: ChatGPT, Gemini, DeepSeek, Google AI Studio, NotebookLM, Doubao, Claude, Kimi, Qwen, Grok, Mistral, LMArena, LongCat, Z.AI, Perplexity, Poe, Tencent Yuanbao, ChatGLM, Google AI Mode.
// @description:fr Sauvegardez et utilisez vos prompts personnalisés dans votre bibliothèque. Utilisez le mode Prompt Dynamique pour insérer des informations interactives et adapter les commandes. Joignez et réutilisez des fichiers à tout moment sans resélection. Compatible avec : ChatGPT, Gemini, DeepSeek, Google AI Studio, NotebookLM, Doubao, Claude, Kimi, Qwen, Grok, Mistral, LMArena, LongCat, Z.AI, Perplexity, Poe, Tencent Yuanbao, ChatGLM, Google AI Mode.
// @description:he שמור והשתמש בפוסטים המותאמים אישית שלך בספרייה משלך. השתמש במצב Dynamic Prompt כדי להוסיף מידע אינטראקטיבי ולהתאים פקודות לפי הצורך. צרף והשתמש בקבצים בכל עת ללא צורך בבחירה מחדש. תואם ל: ChatGPT, Gemini, DeepSeek, Google AI Studio, NotebookLM, Doubao, Claude, Kimi, Qwen, Grok, Mistral, LMArena, LongCat, Z.AI, Perplexity, Poe, Tencent Yuanbao, ChatGLM, Google AI Mode.
// @description:hr Spremite i koristite svoje personalizirane upite u vlastitoj knjižnici. Koristite način Dynamic Prompt za umetanje interaktivnih informacija i prilagodbu naredbi prema potrebi. Priložite i koristite datoteke u bilo kojem trenutku bez ponovnog odabira. Kompatibilno s: ChatGPT, Gemini, DeepSeek, Google AI Studio, NotebookLM, Doubao, Claude, Kimi, Qwen, Grok, Mistral, LMArena, LongCat, Z.AI, Perplexity, Poe, Tencent Yuanbao, ChatGLM, Google AI Mode.
// @description:hu Mentse el és használja személyre szabott promptjait a saját könyvtárában. Használja a Dynamic Prompt módot interaktív információk beillesztéséhez és a parancsok szükség szerinti módosításához. Csatoljon és használjon fájlokat bármikor újra kiválasztás nélkül. Kompatibilis: ChatGPT, Gemini, DeepSeek, Google AI Studio, NotebookLM, Doubao, Claude, Kimi, Qwen, Grok, Mistral, LMArena, LongCat, Z.AI, Perplexity, Poe, Tencent Yuanbao, ChatGLM, Google AI Mode.
// @description:id Simpan dan gunakan prompt pribadi Anda di perpustakaan Anda sendiri. Gunakan mode Dynamic Prompt untuk menyisipkan informasi interaktif dan menyesuaikan perintah sesuai kebutuhan. Lampirkan dan gunakan file kapan saja tanpa perlu memilih ulang. Kompatibel dengan: ChatGPT, Gemini, DeepSeek, Google AI Studio, NotebookLM, Doubao, Claude, Kimi, Qwen, Grok, Mistral, LMArena, LongCat, Z.AI, Perplexity, Poe, Tencent Yuanbao, ChatGLM, Google AI Mode.
// @description:it Salva e usa i tuoi prompt personalizzati nella tua libreria. Usa la modalità Dynamic Prompt per inserire informazioni interattive e adattare i comandi secondo necessità. Allega e usa file in qualsiasi momento senza doverli selezionare di nuovo. Compatibile con: ChatGPT, Gemini, DeepSeek, Google AI Studio, NotebookLM, Doubao, Claude, Kimi, Qwen, Grok, Mistral, LMArena, LongCat, Z.AI, Perplexity, Poe, Tencent Yuanbao, ChatGLM, Google AI Mode.
// @description:ja 独自のライブラリでパーソナライズされたプロンプトを保存して使用します。Dynamic Promptモードを使用して、対話型の情報を挿入し、必要に応じてコマンドを適応させます。再選択することなく、いつでもファイルを添付して使用できます。対応プラットフォーム:ChatGPT, Gemini, DeepSeek, Google AI Studio, NotebookLM, Doubao, Claude, Kimi, Qwen, Grok, Mistral, LMArena, LongCat, Z.AI, Perplexity, Poe, Tencent Yuanbao, ChatGLM, Google AI Mode.
// @description:ka შეინახეთ და გამოიყენეთ თქვენი პერსონალიზებული მოთხოვნები თქვენს ბიბლიოთეკაში. გამოიყენეთ Dynamic Prompt რეჟიმი ინტერაქტიული ინფორმაციის ჩასასმელად და ბრძანებების ადაპტირებისთვის. მიამაგრეთ და გამოიყენეთ ფაილები ნებისმიერ დროს ხელახალი არჩევის გარეშე. თავსებადია: ChatGPT, Gemini, DeepSeek, Google AI Studio, NotebookLM, Doubao, Claude, Kimi, Qwen, Grok, Mistral, LMArena, LongCat, Z.AI, Perplexity, Poe, Tencent Yuanbao, ChatGLM, Google AI Mode.
// @description:ko 사용자 지정 프롬프트를 자신의 라이브러리에 저장하고 사용하세요. Dynamic Prompt 모드를 사용하여 대화형 정보를 삽입하고 필요에 따라 명령을 조정할 수 있습니다. 다시 선택할 필요 없이 언제든지 파일을 첨부하고 사용할 수 있습니다. 호환 대상: ChatGPT, Gemini, DeepSeek, Google AI Studio, NotebookLM, Doubao, Claude, Kimi, Qwen, Grok, Mistral, LMArena, LongCat, Z.AI, Perplexity, Poe, Tencent Yuanbao, ChatGLM, Google AI Mode.
// @description:mr आपल्या स्वतःच्या लायब्ररीमध्ये आपले वैयक्तिक प्रॉम्प्ट जतन करा आणि वापरा. परस्परसंवादी माहिती समाविष्ट करण्यासाठी आणि आवश्यकतेनुसार आदेश जुळवून घेण्यासाठी डायनॅमिक प्रॉम्प्ट मोड वापरा. पुन्हा निवड न करता कधीही फायली जोडा आणि वापरा. यासह सुसंगत: ChatGPT, Gemini, DeepSeek, Google AI Studio, NotebookLM, Doubao, Claude, Kimi, Qwen, Grok, Mistral, LMArena, LongCat, Z.AI, Perplexity, Poe, Tencent Yuanbao, ChatGLM, Google AI Mode.
// @description:nb Lagre og bruk dine personlige ledetekster i ditt eget bibliotek. Bruk Dynamic Prompt-modus for å sette inn interaktiv informasjon og tilpasse kommandoer etter behov. Legg ved og bruk filer når som helst uten å måtte velge dem på nytt. Kompatibel med: ChatGPT, Gemini, DeepSeek, Google AI Studio, NotebookLM, Doubao, Claude, Kimi, Qwen, Grok, Mistral, LMArena, LongCat, Z.AI, Perplexity, Poe, Tencent Yuanbao, ChatGLM, Google AI Mode.
// @description:nl Bewaar en gebruik uw gepersonaliseerde prompts in uw eigen bibliotheek. Gebruik de Dynamic Prompt-modus om interactieve informatie in te voegen en opdrachten aan te passen. Voeg bestanden toe en gebruik ze op elk moment zonder opnieuw te selecteren. Compatibel met: ChatGPT, Gemini, DeepSeek, Google AI Studio, NotebookLM, Doubao, Claude, Kimi, Qwen, Grok, Mistral, LMArena, LongCat, Z.AI, Perplexity, Poe, Tencent Yuanbao, ChatGLM, Google AI Mode.
// @description:pl Zapisuj i używaj spersonalizowanych promptów w własnej bibliotece. Używaj trybu Dynamic Prompt do wstawiania interaktywnych informacji i dostosowywania poleceń. Dołączaj i używaj plików w dowolnym momencie bez ponownego wyboru. Kompatybilne z: ChatGPT, Gemini, DeepSeek, Google AI Studio, NotebookLM, Doubao, Claude, Kimi, Qwen, Grok, Mistral, LMArena, LongCat, Z.AI, Perplexity, Poe, Tencent Yuanbao, ChatGLM, Google AI Mode.
// @description:ro Salvați și utilizați prompturile personalizate în propria bibliotecă. Utilizați modul Dynamic Prompt pentru a insera informații interactive și a adapta comenzile după cum este necesar. Atașați și utilizați fișiere oricând, fără a le selecta din nou. Compatibil cu: ChatGPT, Gemini, DeepSeek, Google AI Studio, NotebookLM, Doubao, Claude, Kimi, Qwen, Grok, Mistral, LMArena, LongCat, Z.AI, Perplexity, Poe, Tencent Yuanbao, ChatGLM, Google AI Mode.
// @description:ru Сохраняйте и используйте свои персонализированные промпты в собственной библиотеке. Используйте режим Dynamic Prompt для вставки интерактивной информации и адаптации команд. Прикрепляйте и используйте файлы в любое время без повторного выбора. Совместимо с: ChatGPT, Gemini, DeepSeek, Google AI Studio, NotebookLM, Doubao, Claude, Kimi, Qwen, Grok, Mistral, LMArena, LongCat, Z.AI, Perplexity, Poe, Tencent Yuanbao, ChatGLM, Google AI Mode.
// @description:sk Uložte a používajte svoje prispôsobené prompty vo vlastnej knižnici. Použite režim Dynamic Prompt na vkladanie interaktívnych informácií a prispôsobenie príkazov podľa potreby. Pripájajte a používajte súbory kedykoľvek bez potreby nového výberu. Kompatibilné s: ChatGPT, Gemini, DeepSeek, Google AI Studio, NotebookLM, Doubao, Claude, Kimi, Qwen, Grok, Mistral, LMArena, LongCat, Z.AI, Perplexity, Poe, Tencent Yuanbao, ChatGLM, Google AI Mode.
// @description:sr Сачувајте и користите своје прилагођене промпте у сопственој библиотеци. Користите режим Dynamic Prompt за уметање интерактивних информација и прилагођавање команди по потреби. Приложите и користите датотеке у било ком тренутку без поновног избора. Компатибилно са: ChatGPT, Gemini, DeepSeek, Google AI Studio, NotebookLM, Doubao, Claude, Kimi, Qwen, Grok, Mistral, LMArena, LongCat, Z.AI, Perplexity, Poe, Tencent Yuanbao, ChatGLM, Google AI Mode.
// @description:sv Spara och använd dina personliga prompts i ditt eget bibliotek. Använd Dynamic Prompt-läget för att infoga interaktiv information och anpassa kommandon efter behov. Bifoga och använd filer när som helst utan att behöva välja dem igen. Kompatibel med: ChatGPT, Gemini, DeepSeek, Google AI Studio, NotebookLM, Doubao, Claude, Kimi, Qwen, Grok, Mistral, LMArena, LongCat, Z.AI, Perplexity, Poe, Tencent Yuanbao, ChatGLM, Google AI Mode.
// @description:th บันทึกและใช้พรอมต์ส่วนตัวของคุณในไลบรารีของคุณเอง ใช้โหมด Dynamic Prompt เพื่อแทรกข้อมูลเชิงโต้ตอบและปรับเปลี่ยนคำสั่งตามต้องการ แนบและใช้ไฟล์ได้ตลอดเวลาโดยไม่ต้องเลือกใหม่ รองรับ: ChatGPT, Gemini, DeepSeek, Google AI Studio, NotebookLM, Doubao, Claude, Kimi, Qwen, Grok, Mistral, LMArena, LongCat, Z.AI, Perplexity, Poe, Tencent Yuanbao, ChatGLM, Google AI Mode
// @description:tr Özelleştirilmiş istemlerinizi (prompts) kendi kütüphanenizde kaydedin ve kullanın. Etkileşimli bilgiler eklemek ve komutları ihtiyaca göre uyarlamak için Dinamik İstem modunu kullanın. Dosyaları yeniden seçmeye gerek kalmadan istediğiniz zaman ekleyin ve kullanın. Şunlarla uyumludur: ChatGPT, Gemini, DeepSeek, Google AI Studio, NotebookLM, Doubao, Claude, Kimi, Qwen, Grok, Mistral, LMArena, LongCat, Z.AI, Perplexity, Poe, Tencent Yuanbao, ChatGLM, Google AI Mode.
// @description:uk Зберігайте та використовуйте свої персоналізовані промпти у власній бібліотеці. Використовуйте режим Dynamic Prompt для вставки інтерактивної інформації та адаптації команд за потребою. Долучайте та використовуйте файли в будь-який час без повторного вибору. Сумісно з: ChatGPT, Gemini, DeepSeek, Google AI Studio, NotebookLM, Doubao, Claude, Kimi, Qwen, Grok, Mistral, LMArena, LongCat, Z.AI, Perplexity, Poe, Tencent Yuanbao, ChatGLM, Google AI Mode.
// @description:ug خاسلاشتۇرۇلغان ئەسكەرتىمىلىرىڭىزنى ئۆزىڭىزنىڭ ئامبىرىدا ساقلاڭ ۋە ئىشلىتىڭ. Dynamic Prompt ھالىتى ئارقىلىق ئۆز-ئارا تەسىر كۆرسىتىدىغان ئۇچۇرلارنى قىستۇرۇڭ ۋە بۇيرۇقلارنى ئېھتىياجغا ئاساسەن تەڭشەڭ. ھۆججەتلەرنى قايتا تاللىماي ھەر ۋاقىت قوشۇڭ ۋە ئىشلىتىڭ. ماسلىشىشچانلىقى: ChatGPT, Gemini, DeepSeek, Google AI Studio, NotebookLM, Doubao, Claude, Kimi, Qwen, Grok, Mistral, LMArena, LongCat, Z.AI, Perplexity, Poe, Tencent Yuanbao, ChatGLM, Google AI Mode.
// @description:vi Lưu và sử dụng các prompt tùy chỉnh trong thư viện của riêng bạn. Sử dụng chế độ Dynamic Prompt để chèn thông tin tương tác và điều chỉnh lệnh theo nhu cầu. Đính kèm và sử dụng tệp bất cứ lúc nào mà không cần chọn lại. Tương thích với: ChatGPT, Gemini, DeepSeek, Google AI Studio, NotebookLM, Doubao, Claude, Kimi, Qwen, Grok, Mistral, LMArena, LongCat, Z.AI, Perplexity, Poe, Tencent Yuanbao, ChatGLM, Google AI Mode.
// @author OHAS
// @homepage https://github.com/0H4S
// @icon https://cdn-icons-png.flaticon.com/512/4997/4997543.png
// @license CC-BY-NC-ND-4.0
// @copyright 2025 OHAS. All Rights Reserved.
// @match *://www.google.com/search?*udm=50*
// @match *://notebooklm.google.com/*
// @match *://aistudio.google.com/*
// @match *://yuanbao.tencent.com/*
// @match *://gemini.google.com/*
// @match *://chat.deepseek.com/*
// @match *://www.perplexity.ai/*
// @match *://chat.mistral.ai/*
// @match *://www.doubao.com/*
// @match *://www.kimi.com/*
// @match *://chat.qwen.ai/*
// @match *://longcat.chat/*
// @match *://chatgpt.com/*
// @match *://lmarena.ai/*
// @match *://chatglm.cn/*
// @match *://chat.z.ai/*
// @match *://claude.ai/*
// @match *://grok.com/*
// @match *://poe.com/*
// @require https://update.greasyfork.icu/scripts/549920.js
// @connect gist.github.com
// @grant GM_getValue
// @grant GM_setValue
// @grant GM_xmlhttpRequest
// @grant GM_registerMenuCommand
// @run-at document-end
// @noframes
// @compatible chrome
// @compatible firefox
// @compatible edge
// @compatible opera
// @bgf-colorLT #847dfd
// @bgf-colorDT #6963ca
// @bgf-compatible brave
// @bgf-copyright [2025 OHAS. All Rights Reserved.](https://gist.github.com/0H4S/ae2fa82957a089576367e364cbf02438)
// @contributionURL https://linktr.ee/0H4S
// @downloadURL none
// ==/UserScript==
(function() {
'use strict';
/*eslint-disable*/
// #region GLOBAL
// ---CHAVES E CONSTANTES---
const LANG_STORAGE_KEY = 'UserScriptLang';
const GLOBAL_FILES_KEY = 'GlobalFiles';
const PROMPT_STORAGE_KEY = 'Prompts';
let currentLang = 'en';
let isInitialized = false;
let isInitializing = false;
let currentButton = null;
let currentPlatform = null;
let pageObserver = null;
let currentMenu = null;
let currentModal = null;
let languageModal = null;
let currentPlaceholderModal = null;
let infoModal = null;
let inlineMenu = null;
let inlineMenuCurrentItems = [];
let inlineMenuIndex = 0;
let currentActiveFileIds = new Set();
// ---TRUSTED TYPES---
const scriptPolicy = window.trustedTypes
? window.trustedTypes.createPolicy('MyPromptPolicy', { createHTML: (input) => input })
: null;
function setSafeInnerHTML(element, html) {
if (!element) return;
if (scriptPolicy) {element.innerHTML = scriptPolicy.createHTML(html);}
else {element.innerHTML = html;}
}
// ---NOTIFICADOR---
const SCRIPT_CONFIG = {notificationsUrl:'https://gist.github.com/0H4S/b2f9a9f92259deadc35bdccb11cd9a75', scriptVersion: '3.4',};
const notifier = new ScriptNotifier(SCRIPT_CONFIG);
notifier.run();
// ---TRADUÇÕES---
const translations = {
'pt-BR': {
langName: 'Português (BR)',
prompt: 'Prompt',
prompts: 'Prompts',
newPrompt: 'Novo Prompt',
editPrompt: 'Editar Prompt',
title: 'Título',
text: 'Prompt',
save: 'Salvar',
close: 'Fechar',
edit: 'Editar',
delete: 'Excluir',
noSavedPrompts: 'Nenhum prompt salvo.',
addPrompt: 'Adicionar prompt',
import: 'Importar',
export: 'Exportar',
confirmDelete: 'Excluir prompt "{title}"?',
noPromptsToExport: 'Não há prompts para exportar.',
promptsImported: '{count} prompts importados com sucesso!',
errorImporting: 'Erro ao importar o arquivo: {error}',
requiredFields: 'Título e prompt são obrigatórios.',
editorNotFound: 'Não foi possível encontrar a área de texto para {platform}.',
languageSettings: '🌐 Idioma',
fillPlaceholders: 'Preencha as Informações',
insert: 'Inserir',
enablePlaceholders: 'Prompt Dinâmico',
autoExecute: 'Envio Automático',
infoTitle: 'Ajuda',
infoDPDesc: 'Acesse o guia de uso completo:
English | Português (BR) | 简体中文',
infoASDesc: 'Envia o prompt para o chat instantaneamente após ser inserido, sem necessidade de ação manual.',
search: 'Procurar prompt...',
searchLanguage: 'Procurar idioma...',
selectAll: 'Selecionar Tudo',
countPrompts: '{count} prompts',
confirmDownloads: 'Você está prestes a baixar {count} arquivos de texto individuais. Continuar?',
noSearchResults: 'Nenhum prompt corresponde à pesquisa.',
ffWarningTitle: 'Aviso Importante',
ffWarningText: 'Nesta área específica da página, o Meu Prompt não consegue interagir corretamente usando o Firefox.',
ffRecommend: 'Para obter suporte completo em todas as áreas do chat no Doubao, recomendamos o uso de navegadores baseados em Chromium (Chrome, Edge, Brave, etc).',
dontShowAgain: 'Remover Botão de Aviso',
select: 'Selecione uma opção:',
context: 'Contexto',
expand: 'Expandir',
collapse: 'Contrair',
idGroup: 'Grupo ID',
uniqueSelection: 'Seleção Única',
filesLabel: 'Arquivos',
addCardTitle: 'Adicionar arquivos',
confirmDeleteFile: 'Apagar arquivo da memória?',
confirmLargeFile: 'Arquivo grande ({fileSizeMB}MB). Deseja continuar mesmo assim?',
sendingFiles: 'Enviando {fileCount} arquivo(s)...',
filesCounter: 'Arquivos ({active}/{total})'
},
'en': {
langName: 'English',
prompt: 'Prompt',
prompts: 'Prompts',
newPrompt: 'New Prompt',
editPrompt: 'Edit Prompt',
title: 'Title',
text: 'Prompt',
save: 'Save',
close: 'Close',
edit: 'Edit',
delete: 'Delete',
noSavedPrompts: 'No saved prompts.',
addPrompt: 'Add prompt',
import: 'Import',
export: 'Export',
confirmDelete: 'Delete prompt "{title}"?',
noPromptsToExport: 'No prompts to export.',
promptsImported: '{count} prompts imported successfully!',
errorImporting: 'Error importing file: {error}',
requiredFields: 'Title and prompt are required.',
editorNotFound: 'Could not find the text area for {platform}.',
languageSettings: '🌐 Language',
fillPlaceholders: 'Fill in the Information',
insert: 'Insert',
enablePlaceholders: 'Dynamic Prompt',
autoExecute: 'Auto-Send',
infoTitle: 'Help',
infoDPDesc: 'Access the complete usage guide:
English | Português (BR) | 简体中文',
infoASDesc: 'Sends the prompt to the chat instantly after being inserted, without needing manual action.',
search: 'Search prompt...',
searchLanguage: 'Search language...',
selectAll: 'Select All',
countPrompts: '{count} prompts',
confirmDownloads: 'You are about to download {count} individual text files. Continue?',
noSearchResults: 'No prompts match your search.',
ffWarningTitle: 'Important Notice',
ffWarningText: 'In this specific area of the page, My Prompt cannot interact properly when using Firefox.',
ffRecommend: 'For full support in all chat areas on Doubao, we recommend using Chromium-based browsers (Chrome, Edge, Brave, etc).',
dontShowAgain: 'Remove Warning Button',
select: 'Select an option:',
context: 'Context',
expand: 'Expand',
collapse: 'Collapse',
idGroup: 'Group ID',
uniqueSelection: 'Unique Selection',
filesLabel: 'Files',
addCardTitle: 'Add files',
confirmDeleteFile: 'Delete file from memory?',
confirmLargeFile: 'Large file ({fileSizeMB}MB). Continue anyway?',
sendingFiles: 'Sending {fileCount} file(s)...',
filesCounter: 'Files ({active}/{total})'
},
'es': {
langName: 'Español',
prompt: 'Prompt',
prompts: 'Prompts',
newPrompt: 'Nuevo Prompt',
editPrompt: 'Editar Prompt',
title: 'Título',
text: 'Prompt',
save: 'Guardar',
close: 'Cerrar',
edit: 'Editar',
delete: 'Eliminar',
noSavedPrompts: 'No hay prompts guardados.',
addPrompt: 'Añadir prompt',
import: 'Importar',
export: 'Exportar',
confirmDelete: '¿Eliminar prompt "{title}"?',
noPromptsToExport: 'No hay prompts para exportar.',
promptsImported: '¡{count} prompts importados con éxito!',
errorImporting: 'Error al importar el archivo: {error}',
requiredFields: 'El título y el prompt son obligatorios.',
editorNotFound: 'No se pudo encontrar el área de texto para {platform}.',
languageSettings: '🌐 Idioma',
fillPlaceholders: 'Rellene la Información',
insert: 'Insertar',
enablePlaceholders: 'Prompt Dinámico',
autoExecute: 'Envío Automático',
infoTitle: 'Ayuda',
infoDPDesc: 'Accede a la guía de uso completa:
English | Português (BR) | 简体中文',
infoASDesc: 'Envía el prompt al chat instantáneamente después de ser insertado, sin necesidad de acción manual.',
search: 'Buscar prompt...',
searchLanguage: 'Buscar idioma...',
selectAll: 'Seleccionar todo',
countPrompts: '{count} prompts',
confirmDownloads: 'Estás a punto de descargar {count} archivos de texto individuales. ¿Continuar?',
noSearchResults: 'Ningún prompt coincide con tu búsqueda.',
ffWarningTitle: 'Aviso Importante',
ffWarningText: 'En esta área específica de la página, Mi Prompt no puede interactuar correctamente cuando se usa Firefox.',
ffRecommend: 'Para obtener compatibilidad completa en todas las áreas del chat en Doubao, recomendamos usar navegadores basados en Chromium (Chrome, Edge, Brave, etc).',
dontShowAgain: 'Quitar Botón de Aviso',
select: 'Seleccione una opción:',
context: 'Contexto',
expand: 'Expandir',
collapse: 'Contraer',
idGroup: 'ID de Grupo',
uniqueSelection: 'Selección Única',
filesLabel: 'Archivos',
addCardTitle: 'Añadir archivos',
confirmDeleteFile: '¿Eliminar archivo de la memoria?',
confirmLargeFile: 'Archivo grande ({fileSizeMB}MB). ¿Continuar de todos modos?',
sendingFiles: 'Enviando {fileCount} archivo(s)...',
filesCounter: 'Archivos ({active}/{total})'
},
'fr': {
langName: 'Français',
prompt: 'Prompt',
prompts: 'Prompts',
newPrompt: 'Nouveau prompt',
editPrompt: 'Modifier le prompt',
title: 'Titre',
text: 'Prompt',
save: 'Enregistrer',
close: 'Fermer',
edit: 'Modifier',
delete: 'Supprimer',
noSavedPrompts: 'Aucun prompt enregistré.',
addPrompt: 'Ajouter un prompt',
import: 'Importer',
export: 'Exporter',
confirmDelete: 'Supprimer le prompt "{title}" ?',
noPromptsToExport: 'Aucun prompt à exporter.',
promptsImported: '{count} prompts importés avec succès !',
errorImporting: 'Erreur lors de l\'importation du fichier : {error}',
requiredFields: 'Le titre et le prompt sont obligatoires.',
editorNotFound: 'Impossible de trouver la zone de texte pour {platform}.',
languageSettings: '🌐 Langue',
fillPlaceholders: 'Remplir les informations',
insert: 'Insérer',
enablePlaceholders: 'Prompt Dynamique',
autoExecute: 'Envoi Automatique',
infoTitle: 'Aide',
infoDPDesc: 'Accédez au guide d\'utilisation complet :
English | Português (BR) | 简体中文',
infoASDesc: 'Envoie le prompt au chat instantanément après son insertion, sans nécessiter d\'action manuelle.',
search: 'Rechercher prompt...',
searchLanguage: 'Rechercher langue...',
selectAll: 'Tout sélectionner',
countPrompts: '{count} prompts',
confirmDownloads: 'Vous êtes sur le point de télécharger {count} fichiers texte individuels. Continuer ?',
noSearchResults: 'Aucun prompt ne correspond à la recherche.',
ffWarningTitle: 'Avis Important',
ffWarningText: 'Dans cette zone spécifique de la page, Mon Prompt ne peut pas interagir correctement avec Firefox.',
ffRecommend: 'Pour une prise en charge complète dans toutes les zones du chat sur Doubao, nous recommandons d’utiliser des navigateurs basés sur Chromium (Chrome, Edge, Brave, etc).',
dontShowAgain: 'Retirer le Bouton d’Avertissement',
select: 'Sélectionnez une option :',
context: 'Contexte',
expand: 'Développer',
collapse: 'Réduire',
idGroup: 'ID de Groupe',
uniqueSelection: 'Sélection Unique',
filesLabel: 'Fichiers',
addCardTitle: 'Ajouter des fichiers',
confirmDeleteFile: 'Supprimer le fichier de la mémoire ?',
confirmLargeFile: 'Fichier volumineux ({fileSizeMB}MB). Continuer quand même ?',
sendingFiles: 'Envoi de {fileCount} fichier(s)...',
filesCounter: 'Fichiers ({active}/{total})'
},
'ru': {
langName: 'Русский',
prompt: 'Промпт',
prompts: 'Промпты',
newPrompt: 'Новый промпт',
editPrompt: 'Редактировать промпт',
title: 'Название',
text: 'Текст промпта',
save: 'Сохранить',
close: 'Закрыть',
edit: 'Редактировать',
delete: 'Удалить',
noSavedPrompts: 'Нет сохраненных промптов.',
addPrompt: 'Добавить промпт',
import: 'Импорт',
export: 'Экспорт',
confirmDelete: 'Удалить промпт "{title}"?',
noPromptsToExport: 'Нет промптов для экспорта.',
promptsImported: 'Успешно импортировано промптов: {count}!',
errorImporting: 'Ошибка при импорте файла: {error}',
requiredFields: 'Название и текст промпта обязательны.',
editorNotFound: 'Не удалось найти текстовое поле для {platform}.',
languageSettings: '🌐 Язык',
fillPlaceholders: 'Заполните данные',
insert: 'Вставить',
enablePlaceholders: 'Динамический промпт',
autoExecute: 'Автоотправка',
infoTitle: 'Справка',
infoDPDesc: 'Открыть полное руководство пользователя:
English | Português (BR) | 简体中文',
infoASDesc: 'Автоматически отправляет промпт в чат сразу после вставки, не требуя ручного подтверждения.',
search: 'Поиск промпта...',
searchLanguage: 'Поиск языка...',
selectAll: 'Выбрать все',
countPrompts: '{count} промптов',
confirmDownloads: 'Вы собираетесь скачать {count} отдельных текстовых файлов. Продолжить?',
noSearchResults: 'По вашему запросу промптов не найдено.',
ffWarningTitle: 'Важное уведомление',
ffWarningText: 'В этой конкретной области страницы Мой Промпты не может корректно взаимодействовать при использовании Firefox.',
ffRecommend: 'Для полной поддержки всех областей чата в Doubao мы рекомендуем использовать браузеры на базе Chromium (Chrome, Edge, Brave и др.).',
dontShowAgain: 'Удалить кнопку предупреждения',
select: 'Выберите вариант:',
context: 'Контекст',
expand: 'Развернуть',
collapse: 'Свернуть',
idGroup: 'ID группы',
uniqueSelection: 'Уникальный выбор',
filesLabel: 'Файлы',
addCardTitle: 'Добавить файлы',
confirmDeleteFile: 'Удалить файл из памяти?',
confirmLargeFile: 'Большой файл ({fileSizeMB}MB). Все равно продолжить?',
sendingFiles: 'Отправка {fileCount} файл(а/ов)...',
filesCounter: 'Файлы ({active}/{total})'
},
'zh-CN': {
langName: '简体中文',
prompt: '提示',
prompts: '提示',
newPrompt: '新建提示',
editPrompt: '编辑提示',
title: '标题',
text: '提示内容',
save: '保存',
close: '关闭',
edit: '编辑',
delete: '删除',
noSavedPrompts: '没有已保存的提示。',
addPrompt: '添加提示',
import: '导入',
export: '导出',
confirmDelete: '确定要删除提示 "{title}" 吗?',
noPromptsToExport: '沒有可導出的提示。',
promptsImported: '成功导入 {count} 个提示!',
errorImporting: '导入文件时出错: {error}',
requiredFields: '标题和提示内容为必填项。',
editorNotFound: '未能找到 {platform} 的文本输入区域。',
languageSettings: '🌐 语言',
fillPlaceholders: '填写信息',
insert: '插入',
enablePlaceholders: '动态提示',
autoExecute: '自动发送',
infoTitle: '帮助',
infoDPDesc: '访问完整的使用指南:
English | Português (BR) | 简体中文',
infoASDesc: '插入后立即将提示发送到聊天室,无需手动操作。',
search: '搜索提示...',
searchLanguage: '搜索语言...',
selectAll: '全选',
countPrompts: '{count} 个提示词',
confirmDownloads: '即将下载 {count} 个单独的文本文件。是否继续?',
noSearchResults: '未找到匹配的提示词。',
ffWarningTitle: '重要提示',
ffWarningText: '在页面的此特定区域,我的提示词 在使用 Firefox 时无法正常互动。',
ffRecommend: '为在 Doubao 的所有聊天区域获得完整支持,建议使用基于 Chromium 的浏览器(Chrome、Edge、Brave 等)。',
dontShowAgain: '移除警告按钮',
select: '请选择一个选项:',
context: '上下文',
expand: '展开',
collapse: '折叠',
idGroup: '组ID',
uniqueSelection: '唯一选择',
filesLabel: '文件',
addCardTitle: '添加文件',
confirmDeleteFile: '从内存中删除文件?',
confirmLargeFile: '文件过大({fileSizeMB}MB)。是否继续?',
sendingFiles: '正在发送 {fileCount} 个文件...',
filesCounter: '文件 ({active}/{total})'
},
'ja': {
langName: '日本語',
prompt: 'プロンプト',
prompts: 'プロンプト',
newPrompt: '新規プロンプト',
editPrompt: 'プロンプト編集',
title: 'タイトル',
text: 'プロンプト',
save: '保存',
close: '閉じる',
edit: '編集',
delete: '削除',
noSavedPrompts: '保存されたプロンプトはありません',
addPrompt: 'プロンプトを追加',
import: 'インポート',
export: 'エクスポート',
confirmDelete: 'プロンプト「{title}」を削除しますか?',
noPromptsToExport: 'エクスポートするプロンプトがありません',
promptsImported: '{count}件のプロンプトをインポートしました',
errorImporting: 'ファイルのインポート中にエラーが発生しました: {error}',
requiredFields: 'タイトルとプロンプトは必須です',
editorNotFound: '{platform}のテキストエリアが見つかりません',
languageSettings: '🌐 言語設定',
fillPlaceholders: '情報を入力',
insert: '挿入',
enablePlaceholders: '動的プロンプト',
autoExecute: '自動送信',
infoTitle: 'ヘルプ',
infoDPDesc: '完全な利用ガイドを見る:
English | Português (BR) | 简体中文',
infoASDesc: '挿入後、手動操作なしでプロンプトをチャットに即座に送信します。',
search: 'プロンプトを検索...',
searchLanguage: '言語を検索...',
selectAll: 'すべて選択',
countPrompts: '{count} 件のプロンプト',
confirmDownloads: '{count} 個のテキストファイルをダウンロードしようとしています。続行しますか?',
noSearchResults: '検索条件に一致するプロンプトはありません。',
ffWarningTitle: '重要なお知らせ',
ffWarningText: 'ページのこの特定エリアでは、Firefox を使用している場合、マイプロンプトが正しく動作できません。',
ffRecommend: 'Doubao のすべてのチャット領域で完全なサポートを受けるには、Chromium ベースのブラウザ(Chrome、Edge、Brave など)の使用を推奨します。',
dontShowAgain: '警告ボタンを削除',
select: 'オプションを選択してください:',
context: 'コンテキスト',
expand: '展開',
collapse: '折りたたむ',
idGroup: 'グループID',
uniqueSelection: '一意選択',
filesLabel: 'ファイル',
addCardTitle: 'ファイルを追加',
confirmDeleteFile: 'メモリからファイルを削除しますか?',
confirmLargeFile: 'ファイルが大きいです({fileSizeMB}MB)。続行しますか?',
sendingFiles: '{fileCount} 個のファイルを送信中...',
filesCounter: 'ファイル ({active}/{total})'
},
'ko': {
langName: '한국어',
prompt: '프롬프트',
prompts: '프롬프트',
newPrompt: '새 프롬프트',
editPrompt: '프롬프트 편집',
title: '제목',
text: '프롬프트',
save: '저장',
close: '닫기',
edit: '편집',
delete: '삭제',
noSavedPrompts: '저장된 프롬프트가 없습니다',
addPrompt: '프롬프트 추가',
import: '가져오기',
export: '내보내기',
confirmDelete: '프롬프트 "{title}"을(를) 삭제하시겠습니까?',
noPromptsToExport: '내보낼 프롬프트가 없습니다',
promptsImported: '프롬프트 {count}개를 성공적으로 가져왔습니다',
errorImporting: '파일 가져오기 오류: {error}',
requiredFields: '제목과 프롬프트는 필수 항목입니다',
editorNotFound: '{platform}의 텍스트 영역을 찾을 수 없습니다',
languageSettings: '🌐 언어 설정',
fillPlaceholders: '정보 채우기',
insert: '삽입',
enablePlaceholders: '동적 프롬프트',
autoExecute: '자동 전송',
infoTitle: '도움말',
infoDPDesc: '전체 사용 가이드 보기:
English | Português (BR) | 简体中文',
infoASDesc: '수동 조치 없이 삽입 후 즉시 프롬프트를 채팅으로 보냅니다.',
search: '프롬프트 검색...',
searchLanguage: '언어 검색...',
selectAll: '전체 선택',
countPrompts: '{count}개의 프롬프트',
confirmDownloads: '{count}개의 개별 텍스트 파일을 다운로드하시겠습니까?',
noSearchResults: '검색 결과와 일치하는 프롬프트가 없습니다.',
ffWarningTitle: '중요 안내',
ffWarningText: '페이지의 이 특정 영역에서는 Firefox 사용 시 나의 프롬프트가 제대로 동작하지 않습니다.',
ffRecommend: 'Doubao의 모든 채팅 영역에서 완전한 지원을 받으려면 Chromium 기반 브라우저(Chrome, Edge, Brave 등)를 사용할 것을 권장합니다.',
dontShowAgain: '경고 버튼 제거',
select: '옵션을 선택하세요:',
context: '컨텍스트',
expand: '펼치기',
collapse: '접기',
idGroup: '그룹 ID',
uniqueSelection: '고유 선택',
filesLabel: '파일',
addCardTitle: '파일 추가',
confirmDeleteFile: '메모리에서 파일을 삭제하시겠습니까?',
confirmLargeFile: '파일이 큽니다 ({fileSizeMB}MB). 계속하시겠습니까?',
sendingFiles: '{fileCount}개 파일 전송 중...',
filesCounter: '파일 ({active}/{total})'
}
};
// ---DEFINIÇÃO DE IDIOMA---
function getTranslation(key, replacements = {}) {
let text = translations[currentLang]?.[key] || translations.en[key];
Object.entries(replacements).forEach(([p, v]) => text = text.replace(`{${p}}`, v));
return text;
}
async function determineLanguage() {
const savedLang = await GM_getValue(LANG_STORAGE_KEY);
if (savedLang && translations[savedLang]) {
currentLang = savedLang;
return;
}
const browserLang = (navigator.language || navigator.userLanguage).toLowerCase();
if (browserLang.startsWith('pt')) currentLang = 'pt-BR';
else if (browserLang.startsWith('zh')) currentLang = 'zh-CN';
else if (browserLang.startsWith('en')) currentLang = 'en';
else if (browserLang.startsWith('es')) currentLang = 'es';
else if (browserLang.startsWith('fr')) currentLang = 'fr';
else if (browserLang.startsWith('ru')) currentLang = 'ru';
else if (browserLang.startsWith('ja')) currentLang = 'ja';
else if (browserLang.startsWith('ko')) currentLang = 'ko';
else currentLang = 'en';
}
// ---SELETORES CAMPO DE TEXTO---
const platformSelectors = {
chatgpt: '#prompt-textarea',
deepseek: 'textarea.ds-scroll-area',
googleaistudio: 'textarea',
qwen: 'textarea#chat-input',
zai: 'textarea#chat-input',
gemini: 'div.ql-editor[contenteditable="true"]',
lmarena: 'textarea[name="message"]',
kimi: 'div.chat-input-editor[contenteditable="true"]',
claude: 'div.ProseMirror[contenteditable="true"]',
grok: 'div.tiptap.ProseMirror[contenteditable="true"], textarea',
perplexity: '#ask-input',
doubao: 'textarea[data-testid="chat_input_input"], div[data-testid="chat_input_input"]',
longcat: 'div.tiptap.ProseMirror',
mistral: '.ProseMirror',
yuanbao: 'div.chat-input-editor > div.ql-editor',
chatglm: 'textarea.scroll-display-none',
poe: 'textarea[class*="GrowingTextArea_textArea"]',
googleModoIA: 'textarea.ITIRGe',
notebooklm: 'textarea.query-box-input',
};
// ---GERENCIAMENTO DE ARQUIVOS/ANEXOS---
async function getGlobalFiles() {
return await GM_getValue(GLOBAL_FILES_KEY, []);
}
async function saveGlobalFile(fileObj) {
const files = await getGlobalFiles();
if (!files.find(f => f.name === fileObj.name && f.size === fileObj.size)) {
files.push(fileObj);
await GM_setValue(GLOBAL_FILES_KEY, files);
}
return files;
}
async function deleteGlobalFile(id) {
let files = await getGlobalFiles();
files = files.filter(f => f.id !== id);
await GM_setValue(GLOBAL_FILES_KEY, files);
}
function dataURLtoFile(dataurl, filename) {
var arr = dataurl.split(','), mime = arr[0].match(/:(.*?);/)[1],
bstr = atob(arr[1]), n = bstr.length, u8arr = new Uint8Array(n);
while(n--){ u8arr[n] = bstr.charCodeAt(n); }
return new File([u8arr], filename, {type:mime});
}
// ---HELPERS---
function waitFor(selector, timeout = 8000) {
return new Promise((resolve, reject) => {
const el = document.querySelector(selector);
if (el) { resolve(el); return; }
const timer = setTimeout(() => { obs.disconnect(); reject(`Timeout esperando por ${selector}`); }, timeout);
const obs = new MutationObserver(() => {
const target = document.querySelector(selector);
if (target) { clearTimeout(timer); obs.disconnect(); resolve(target); }
});
if (document.body) obs.observe(document.body, { childList: true, subtree: true });
else document.addEventListener('DOMContentLoaded', () => obs.observe(document.body, { childList: true, subtree: true }));
});
}
const debounce = (func, wait) => {
let timeout;
return (...args) => {
clearTimeout(timeout);
timeout = setTimeout(() => func.apply(this, args), wait);
};
};
async function getAll() { return await GM_getValue(PROMPT_STORAGE_KEY, []); }
// ---GERENCIAMENTO DE PROMPTS---
async function addItem(item) {
const prompts = await getAll();
prompts.unshift(item);
await GM_setValue(PROMPT_STORAGE_KEY, prompts);
}
async function update(index, item) {
let prompts = await getAll();
if (prompts[index]) {
prompts[index] = item;
await GM_setValue(PROMPT_STORAGE_KEY, prompts);
}
}
async function remove(index) {
let prompts = await getAll();
prompts.splice(index, 1);
await GM_setValue(PROMPT_STORAGE_KEY, prompts);
}
// ---TOOLTIPS CUSTOMIZADOS---
function createCustomTooltip(button, text, position = 'top') {
let tooltipElement = null;
const showTooltip = () => {
if (tooltipElement) return;
tooltipElement = document.createElement('div');
tooltipElement.className = `mp-tooltip mp-tooltip-${position}`;
const content = document.createElement('div');
content.className = 'mp-tooltip-content';
content.textContent = text;
const arrow = document.createElement('div');
arrow.className = 'mp-tooltip-arrow';
tooltipElement.appendChild(content);
tooltipElement.appendChild(arrow);
document.body.appendChild(tooltipElement);
const btnRect = button.getBoundingClientRect();
const tooltipWidth = tooltipElement.offsetWidth;
const tooltipHeight = tooltipElement.offsetHeight;
const margin = 8;
let top, left;
if (position === 'bottom') {top = btnRect.bottom + margin + window.scrollY;}
else if (position === 'top' ) {top = btnRect.top - tooltipHeight - margin + window.scrollY;}
else if (position === 'left' ) {top = btnRect.top + (btnRect.height / 2) - (tooltipHeight / 2) + window.scrollY; left = btnRect.left - tooltipWidth - margin; }
else if (position === 'right' ) {top = btnRect.top + (btnRect.height / 2) - (tooltipHeight / 2) + window.scrollY; left = btnRect.right + margin;}
if (position === 'top' || position === 'bottom') { left = btnRect.left + (btnRect.width / 2) - (tooltipWidth / 2); }
const screenPadding = 10;
if (left < screenPadding) {left = screenPadding;}
else if (left + tooltipWidth > window.innerWidth - screenPadding) {left = window.innerWidth - tooltipWidth - screenPadding;}
tooltipElement.style.left = `${Math.round(left)}px`;
tooltipElement.style.top = `${Math.round(top)}px`;
requestAnimationFrame(() => {
tooltipElement.classList.add('visible');
});
};
const hideTooltip = () => {
if (!tooltipElement) return;
const el = tooltipElement;
tooltipElement = null;
el.classList.remove('visible');
setTimeout(() => {
if (document.body.contains(el)) document.body.removeChild(el);
}, 150);
};
button.addEventListener('mouseenter', showTooltip);
button.addEventListener('mouseleave', hideTooltip);
button.addEventListener('mousedown', hideTooltip);
}
// ---ESTILIZAÇÕES GLOBAIS---
function injectGlobalStyles() {
const styleId = 'my-prompt-styles';
if (document.getElementById(styleId)) return;
const styleElement = document.createElement('style');
styleElement.id = styleId;
setSafeInnerHTML(styleElement, `
/* ---VARIÁVEIS E TEMA (CLARO / ESCURO)--- */
:root {
/* Tipografia */
--mp-font-family-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol" !important;
/* Cores Base (Modo Claro) */
--mp-bg-primary: #ffffff;
--mp-bg-secondary: #f8f9fa;
--mp-bg-tertiary: #f1f3f5;
--mp-bg-overlay: rgba(10, 10, 10, 0.5);
/* Texto */
--mp-text-primary: #212529;
--mp-text-secondary: #495057;
--mp-text-tertiary: #868e96;
/* Bordas */
--mp-border-primary: #dee2e6;
--mp-border-secondary: #ced4da;
/* Cores de Ação */
--mp-accent-primary: #7071fc;
--mp-accent-primary-hover: #595ac9;
--mp-accent-yellow: #fab005;
--mp-accent-yellow-hover: #f08c00;
--mp-accent-red: #f03e3e;
--mp-accent-red-hover: #c92a2a;
/* Sombras e Bordas */
--mp-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
--mp-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
--mp-shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.1);
--mp-border-radius-sm: 4px;
--mp-border-radius-md: 8px;
--mp-border-radius-lg: 16px;
/* Transições */
--mp-transition-fast: 0.2s cubic-bezier(0.25, 1, 0.5, 1);
}
@media (prefers-color-scheme: dark) {
:root {
/* Cores Base (Modo Escuro) */
--mp-bg-primary: #212529;
--mp-bg-secondary: #2c2c30;
--mp-bg-tertiary: #343a40;
--mp-bg-overlay: rgba(0, 0, 0, 0.7);
/* Texto */
--mp-text-primary: #f8f9fa;
--mp-text-secondary: #e9ecef;
--mp-text-tertiary: #adb5bd;
/* Bordas */
--mp-border-primary: #495057;
--mp-border-secondary: #868e96;
/* Sombras */
--mp-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.15);
--mp-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.25);
--mp-shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.3);
}
}
/* ---UTILITÁRIOS GERAIS--- */
.mp-hidden {
display: none !important;
}
/* ---SISTEMA DE SCROLL--- */
.mp-scroll-invisible {
overflow-y: auto !important;
scrollbar-width: none !important; /* Firefox */
-ms-overflow-style: none !important; /* IE/Edge */
scroll-behavior: smooth;
}
/* Remove scrollbar no Chrome/Safari/Webkit */
.mp-scroll-invisible::-webkit-scrollbar {
display: none;
width: 0;
height: 0;
}
/* Wrapper que envolve a lista e contém as setas absolutas */
.mp-scroll-wrapper {
position: relative;
display: flex;
flex-direction: column;
flex: 1;
overflow: hidden;
min-height: 0;
max-width: 100%;
box-sizing: border-box;
}
/* Estilo Base das Setas */
.mp-scroll-arrow {
position: absolute;
left: 0;
right: 0;
height: 28px;
display: flex;
align-items: center;
justify-content: center;
color: var(--mp-text-tertiary);
cursor: pointer;
opacity: 0;
pointer-events: none;
transition: opacity 0.2s ease, color 0.2s ease;
z-index: 10;
}
/* Seta Superior */
.mp-scroll-arrow.up {
top: 0;
background: linear-gradient(to bottom, var(--scroll-bg, var(--mp-bg-primary)) 30%, transparent);
}
/* Seta Inferior */
.mp-scroll-arrow.down {
bottom: 0;
background: linear-gradient(to top, var(--scroll-bg, var(--mp-bg-primary)) 30%, transparent);
}
/* Estados da Seta */
.mp-scroll-arrow:hover {
color: var(--mp-accent-primary);
}
.mp-scroll-arrow.visible {
opacity: 1;
pointer-events: auto;
}
/* Ícone SVG da Seta */
.mp-scroll-arrow svg {
width: 20px;
height: 20px;
filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}
/* --- AJUSTE ESPECÍFICO PARA O TEXTAREA DO EDITOR DE PROMPT --- */
#AB_modal_box_el #__ap_text,
#prompt-menu-container #__ap_text,
.mp-modal-box .form-group:has(#__ap_text) .form-textarea {
border: none !important;
box-shadow: none !important;
background-color: transparent !important;
padding: 10px;
width: 100%;
height: 100%;
}
.mp-modal-box .form-group:has(#__ap_text) .mp-scroll-wrapper {
border: 1px solid var(--mp-border-primary);
border-radius: var(--mp-border-radius-md);
background-color: var(--mp-bg-secondary);
transition: border-color 0.2s, box-shadow 0.2s;
overflow: hidden !important;
display: flex;
flex-direction: column;
height: 300px;
}
.mp-modal-box .form-group:has(#__ap_text) .mp-scroll-wrapper:focus-within {
border-color: var(--mp-accent-primary);
box-shadow: 0 0 0 3px color-mix(in srgb, var(--mp-accent-primary) 25%, transparent);
}
.mp-modal-box.mp-expanded .form-group:has(#__ap_text) .mp-scroll-wrapper {
height: 100% !important;
}
/* ---OVERLAY E MODAL PRINCIPAL--- */
.mp-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: var(--mp-bg-overlay);
z-index: 2147483647;
display: flex;
justify-content: center;
align-items: center;
backdrop-filter: blur(4px);
opacity: 0;
visibility: hidden;
transition: opacity var(--mp-transition-fast), visibility var(--mp-transition-fast);
}
.mp-overlay.visible {
opacity: 1;
visibility: visible;
}
.mp-modal-box {
font-family: var(--mp-font-family-base) !important;
background-color: var(--mp-bg-primary);
color: var(--mp-text-primary);
border-radius: var(--mp-border-radius-lg);
padding: 24px;
box-shadow: var(--mp-shadow-lg);
width: min(90vw, 520px);
border: 1px solid var(--mp-border-primary);
transform: scale(0.95) translateY(10px);
opacity: 0;
transition: transform var(--mp-transition-fast), opacity var(--mp-transition-fast), width 0.3s cubic-bezier(0.4, 0, 0.2, 1), height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
position: relative;
display: flex;
flex-direction: column;
max-height: 85vh;
}
.mp-modal-box.mp-expanded {
width: 900px !important;
max-width: 95vw !important;
height: 85vh !important;
display: flex;
flex-direction: column;
}
.mp-modal-box.mp-expanded .modal-title {
display: block !important;
visibility: visible !important;
text-align: center;
margin-bottom: 20px;
flex-shrink: 0;
}
.mp-modal-box.mp-expanded .form-group:has(.form-textarea) {
flex: 1;
display: flex;
flex-direction: column;
min-height: 0;
margin-bottom: 24px;
}
.mp-modal-box.mp-expanded .mp-scroll-wrapper {
flex: 1;
height: 100% !important;
}
.mp-modal-box.mp-expanded .form-textarea {
height: 100% !important;
}
.mp-modal-box.mp-expanded .mp-switch-container {
padding-top: 10px;
}
.mp-overlay.visible .mp-modal-box {
transform: scale(1) translateY(0);
opacity: 1;
}
.modal-title {
font-size: 18px;
font-weight: 600;
margin: 0 0 20px;
text-align: center;
color: var(--mp-text-primary);
flex-shrink: 0;
}
.modal-footer {
display: flex;
justify-content: center;
margin-top: 16px;
flex-shrink: 0;
}
/* Botões de Fechar e Info */
.mp-modal-close-btn,
.mp-modal-info-btn {
position: absolute;
top: 12px;
background: none;
border: none;
color: var(--mp-text-tertiary);
cursor: pointer;
width: 32px;
height: 32px;
border-radius: 50%;
transition: transform 0.3s ease, color 0.3s ease, background-color 0.3s ease;
display: flex;
justify-content: center;
align-items: center;
padding: 0;
z-index: 20;
}
.mp-modal-close-btn {
right: 12px;
}
.mp-modal-info-btn {
right: 88px;
}
.mp-modal-close-btn:hover {
transform: rotate(90deg);
color: var(--mp-accent-red);
background-color: color-mix(in srgb, var(--mp-accent-red) 15%, transparent);
}
.mp-modal-info-btn:hover {
transform: scale(1.1);
color: var(--mp-accent-primary);
background-color: color-mix(in srgb, var(--mp-accent-primary) 15%, transparent);
}
.mp-modal-close-btn svg,
.mp-modal-info-btn svg {
width: 20px;
height: 20px;
stroke: currentColor;
stroke-width: 2.5;
fill: none;
}
.mp-modal-info-btn svg {
stroke-width: 0;
fill: currentColor;
}
/* Estilo do Botão de Expandir */
.mp-modal-expand-btn {
position: absolute;
top: 12px;
right: 50px;
background: none;
border: none;
color: var(--mp-text-tertiary);
cursor: pointer;
width: 32px;
height: 32px;
border-radius: 50%;
transition: transform 0.3s ease, color 0.3s ease, background-color 0.3s ease;
display: flex;
justify-content: center;
align-items: center;
padding: 0;
z-index: 20;
}
.mp-modal-expand-btn:hover {
transform: scale(1.1);
color: var(--mp-accent-primary);
background-color: color-mix(in srgb, var(--mp-accent-primary) 15%, transparent);
}
.mp-modal-expand-btn svg {
width: 20px;
height: 20px;
stroke: currentColor;
stroke-width: 2;
fill: none;
}
/* ---ANEXOS--- */
.mp-files-accordion {
border: 1px solid var(--mp-border-primary);
border-radius: var(--mp-border-radius-md);
background-color: var(--mp-bg-secondary);
overflow: hidden;
margin-top: 10px;
margin-bottom: 20px;
flex-shrink: 0;
transition: border-color 0.2s;
display: flex;
flex-direction: column;
}
.mp-files-accordion:hover {
border-color: var(--mp-accent-primary);
}
.mp-accordion-header {
padding: 10px 12px;
background-color: var(--mp-bg-secondary);
cursor: pointer;
font-size: 13px;
font-weight: 600;
color: var(--mp-text-secondary);
display: flex;
justify-content: space-between;
align-items: center;
user-select: none;
transition: background 0.2s;
border-bottom: 1px solid transparent;
flex-shrink: 0;
}
.mp-accordion-header:hover {
color: var(--mp-text-primary);
background-color: var(--mp-bg-tertiary);
}
.mp-acc-arrow {
width: 16px;
height: 16px;
transition: transform 0.2s ease;
opacity: 0.6;
}
.mp-files-accordion.open .mp-accordion-header {
border-bottom: 1px solid var(--mp-border-primary);
background-color: var(--mp-bg-tertiary);
}
.mp-files-accordion.open .mp-acc-arrow {
transform: rotate(180deg);
opacity: 1;
color: var(--mp-accent-primary);
}
.mp-accordion-content {
display: none;
background-color: var(--mp-bg-primary);
position: relative;
}
.mp-files-accordion.open .mp-accordion-content {
display: block;
}
/* SCROLL WRAPPER COM RESPIRO */
.mp-file-scroll-wrapper {
max-height: 170px;
overflow-y: auto;
padding: 12px 10px;
scrollbar-width: none;
-ms-overflow-style: none;
box-sizing: border-box;
}
.mp-file-scroll-wrapper::-webkit-scrollbar {
display: none;
}
.mp-file-grid {
display: grid;
grid-template-columns: repeat(auto-fill, 70px);
justify-content: center;
gap: 10px;
width: 100%;
}
.mp-file-card,
.mp-add-file-card {
position: relative;
width: 100%;
height: 70px;
border-radius: 6px;
flex-shrink: 0;
cursor: pointer;
transition: all 0.2s ease;
box-sizing: border-box;
}
/* Estilo Card Arquivo */
.mp-file-card {
background: var(--mp-bg-secondary);
border: 1px solid var(--mp-border-primary);
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
}
.mp-add-file-card {
border: 2px dashed var(--mp-border-primary);
display: flex;
align-items: center;
justify-content: center;
color: var(--mp-text-tertiary);
background: transparent;
}
.mp-add-file-card:hover {
border-color: var(--mp-accent-primary);
color: var(--mp-accent-primary);
background-color: color-mix(in srgb, var(--mp-accent-primary) 5%, transparent);
}
.mp-add-icon {
width: 24px;
height: 24px;
stroke: currentColor;
stroke-width: 2;
}
/* Estados */
.mp-file-card.inactive {
opacity: 0.5;
filter: grayscale(100%);
}
.mp-file-card.inactive:hover {
opacity: 0.9;
filter: grayscale(0%);
border-color: var(--mp-text-tertiary);
}
.mp-file-card.active {
opacity: 1;
border-color: var(--mp-accent-yellow);
box-shadow: 0 0 0 2px color-mix(in srgb, var(--mp-accent-yellow) 20%, transparent);
}
.mp-file-thumb {
width: 100%;
height: 100%;
object-fit: cover;
}
.mp-file-icon-gen {
width: 28px;
height: 28px;
color: var(--mp-text-secondary);
}
/* Botão Delete */
.mp-file-delete-perm {
position: absolute;
top: 2px;
right: 2px;
width: 16px;
height: 16px;
background: rgba(0, 0, 0, 0.6);
color: white;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 10px;
opacity: 0;
transition: opacity 0.2s;
z-index: 10;
}
.mp-file-delete-perm:hover {
background-color: var(--mp-accent-red);
}
.mp-file-card:hover .mp-file-delete-perm {
opacity: 1;
}
/* Tooltip */
.mp-file-card::after {
content: attr(title);
position: absolute;
bottom: 0;
left: 0;
width: 100%;
background: rgba(0, 0, 0, 0.7);
color: white;
font-size: 9px;
padding: 2px 0;
text-align: center;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
transform: translateY(100%);
transition: transform 0.2s;
}
.mp-file-card:hover::after {
transform: translateY(0);
}
/* --- HELPERS E TOOLTIPS DE CONTEXTO --- */
.mp-label-wrapper {
display: flex;
align-items: center;
gap: 6px;
margin-bottom: 6px;
width: 100%;
}
.mp-help-icon {
color: var(--mp-accent-primary);
cursor: pointer;
display: flex;
align-items: center;
transition: transform 0.2s;
opacity: 0.8;
}
.mp-help-icon:hover {
transform: scale(1.1);
opacity: 1;
}
.mp-help-icon svg {
width: 15px;
height: 15px;
fill: currentColor;
}
.mp-context-bubble {
display: none;
background-color: var(--mp-bg-tertiary);
border-left: 3px solid var(--mp-accent-primary);
padding: 8px 12px;
border-radius: 0 var(--mp-border-radius-sm) var(--mp-border-radius-sm) 0;
margin-bottom: 12px;
font-size: 13px;
color: var(--mp-text-secondary);
line-height: 1.4;
animation: mp-fade-in-down 0.2s ease-out forwards;
width: 100%;
box-sizing: border-box;
}
.mp-context-bubble.visible {
display: block;
}
.mp-context-bubble strong {
color: var(--mp-text-primary);
font-weight: 600;
}
@keyframes mp-fade-in-down {
from {
opacity: 0;
transform: translateY(-5px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
/* ---MENU FLUTUANTE DE PROMPTS--- */
.prompt-menu {
position: fixed;
min-width: 320px;
max-width: 420px;
background-color: var(--mp-bg-primary);
border: 1px solid var(--mp-border-primary);
border-radius: var(--mp-border-radius-lg);
box-shadow: var(--mp-shadow-lg);
z-index: 2147483647;
display: flex;
flex-direction: column;
user-select: none;
color: var(--mp-text-primary) !important;
font-family: var(--mp-font-family-base) !important;
overflow: hidden;
opacity: 0;
visibility: hidden;
transform: scale(0.95);
transform-origin: top left;
transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
}
.prompt-menu.visible {
opacity: 1;
visibility: visible;
transform: scale(1);
transition-delay: 0s;
}
.prompt-menu-list {
max-height: 220px;
padding: 4px;
}
.prompt-item-row {
display: flex;
align-items: center;
justify-content: space-between;
padding: 8px 12px;
border-radius: var(--mp-border-radius-md);
cursor: pointer;
transition: background-color 0.15s ease-in-out;
}
.prompt-item-row:hover {
background-color: var(--mp-bg-tertiary);
}
.prompt-title {
font-size: 14px;
font-weight: 500;
flex: 1;
padding-right: 12px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
color: var(--mp-text-secondary);
}
.prompt-item-row:hover .prompt-title {
color: var(--mp-text-primary);
}
.prompt-actions {
display: flex;
align-items: center;
gap: 4px;
}
.action-btn {
background: transparent;
border: none;
cursor: pointer;
padding: 6px;
border-radius: var(--mp-border-radius-sm);
transition: background-color 0.15s ease-in-out, color 0.15s ease-in-out;
display: flex;
align-items: center;
justify-content: center;
line-height: 0;
color: var(--mp-text-secondary);
}
.action-btn svg {
width: 16px;
height: 16px;
display: block;
}
.action-btn.edit:hover {
background-color: var(--mp-bg-tertiary);
color: var(--mp-accent-yellow);
}
.action-btn.delete:hover {
background-color: var(--mp-bg-tertiary);
color: var(--mp-accent-red);
}
/* Rodapé do Menu */
.menu-footer-grid {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
border-top: 1px solid var(--mp-border-primary);
background-color: var(--mp-bg-secondary);
flex-shrink: 0;
}
.menu-footer-btn {
display: flex;
align-items: center;
justify-content: center;
background: transparent;
border: none;
cursor: pointer;
padding: 12px 0;
color: var(--mp-text-secondary);
transition: all 0.2s ease;
height: auto;
}
.menu-footer-btn:not(:last-child) {
border-right: 1px solid var(--mp-border-primary);
}
.menu-footer-btn svg {
width: 20px;
height: 20px;
transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.menu-footer-btn:hover svg {
transform: scale(1.2);
}
.menu-footer-btn.btn-export:hover {
background-color: rgba(34, 129, 207, 0.1);
color: #2281cfff;
}
.menu-footer-btn.btn-add:hover {
background-color: rgba(32, 201, 97, 0.1);
color: #20c961ff;
transform: none;
}
.menu-footer-btn.btn-add:hover svg {
transform: scale(1.4);
}
.menu-footer-btn.btn-import:hover {
background-color: rgba(253, 126, 20, 0.1);
color: #fd7e14;
}
/* ---FORMULÁRIOS E INPUTS--- */
.form-group {
display: flex;
flex-direction: column;
margin-bottom: 16px;
flex-shrink: 0;
}
.form-label {
margin-bottom: 8px;
font-size: 13px !important;
font-weight: 500 !important;
color: var(--mp-text-secondary);
display: block;
}
.form-input,
.form-textarea {
background-color: var(--mp-bg-secondary) !important;
color: var(--mp-text-primary) !important;
border: 1px solid var(--mp-border-primary) !important;
border-radius: var(--mp-border-radius-md);
padding: 10px;
width: 100%;
box-sizing: border-box;
transition: border-color 0.2s, box-shadow 0.2s;
outline: 0 !important;
font-family: var(--mp-font-family-base) !important;
font-size: 14px !important;
}
.form-textarea {
height: 300px !important;
resize: none !important;
display: block;
}
.form-input:focus,
.form-textarea:focus {
border-color: var(--mp-accent-primary) !important;
box-shadow: 0 0 0 3px color-mix(in srgb, var(--mp-accent-primary) 25%, transparent) !important;
}
.form-input::placeholder,
.form-textarea::placeholder,
.mp-search-input::placeholder,
.menu-search-input::placeholder,
.lang-search-input::placeholder {
color: var(--mp-text-tertiary) !important;
opacity: 0.7;
}
/* Switches (Checkbox estilo Toggle) */
.mp-switch-container {
display: flex;
justify-content: space-between;
align-items: center;
padding: 10px 4px 0 4px;
margin: -8px 0 24px;
flex-shrink: 0;
}
.mp-switch {
display: flex;
align-items: center;
gap: 8px;
}
.mp-switch input[type="checkbox"] {
height: 0;
width: 0;
visibility: hidden;
position: absolute;
}
.mp-switch label {
cursor: pointer;
text-indent: -9999px;
width: 40px;
height: 22px;
background: var(--mp-bg-tertiary);
display: block;
border-radius: 100px;
position: relative;
transition: background-color var(--mp-transition-fast);
}
.mp-switch label:after {
content: '';
position: absolute;
top: 3px;
left: 3px;
width: 16px;
height: 16px;
background: #fff;
border-radius: 90px;
transition: 0.3s cubic-bezier(.25, 1, .5, 1);
box-shadow: var(--mp-shadow-sm);
}
.mp-switch input:checked+label {
background: var(--mp-accent-primary);
}
.mp-switch input:checked+label:after {
left: calc(100% - 3px);
transform: translateX(-100%);
}
.mp-switch .switch-text {
font-size: 13px;
font-weight: 500;
color: var(--mp-text-secondary);
cursor: pointer;
user-select: none;
}
/* Checkboxe */
.mp-checkbox, .mp-option-item input[type="checkbox"] {
-webkit-appearance: none !important;
appearance: none !important;
width: 18px !important;
height: 18px !important;
border: 1px solid var(--mp-border-primary) !important;
border-radius: var(--mp-border-radius-sm) !important;
background-color: var(--mp-bg-secondary) !important;
cursor: pointer !important;
margin: 0 !important;
display: grid !important;
place-content: center !important;
transition: all 0.2s ease;
}
.mp-checkbox:checked, .mp-option-item input[type="checkbox"]:checked {
background-color: var(--mp-accent-primary) !important;
border-color: var(--mp-accent-primary) !important;
}
.mp-checkbox::before, .mp-option-item input[type="checkbox"]::before {
content: "";
width: 10px;
height: 10px;
clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
background-color: #ffffff;
transform: scale(0);
transition: 0.15s transform ease-in-out;
}
.mp-checkbox:checked::before, .mp-option-item input[type="checkbox"]:checked::before {
transform: scale(1);
}
/* Campos de Busca */
.mp-search-container,
.menu-search-container {
position: sticky;
top: 0;
z-index: 10;
display: flex;
flex-direction: column;
flex-shrink: 0;
}
.menu-search-container {
padding: 10px 12px;
background-color: var(--mp-bg-secondary);
border-bottom: 1px solid var(--mp-border-primary);
}
.mp-search-input,
.menu-search-input,
.lang-search-input {
width: 100%;
padding: 10px 12px;
border-radius: var(--mp-border-radius-md);
border: 1px solid var(--mp-border-primary);
background-color: var(--mp-bg-secondary);
color: var(--mp-text-primary);
font-family: var(--mp-font-family-base) !important;
font-size: 13px;
box-sizing: border-box;
outline: none;
transition: border-color 0.2s;
}
.menu-search-input {
background-color: var(--mp-bg-primary) !important;
}
.lang-search-input {
margin-bottom: 12px;
}
.mp-search-input:focus,
.menu-search-input:focus,
.lang-search-input:focus {
border-color: var(--mp-accent-primary);
}
/* ---MENUS ESPECÍFICOS (EXPORTAÇÃO, DINÂMICO, IDIOMAS)--- */
/* Exportação */
.mp-export-actions {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 20px;
margin-bottom: 20px;
font-size: 13px;
color: var(--mp-text-secondary);
border-bottom: 1px solid var(--mp-border-primary);
padding-bottom: 16px;
}
.mp-checkbox-wrapper {
display: flex;
align-items: center;
cursor: pointer;
user-select: none;
}
.mp-export-list {
display: flex;
flex-direction: column;
gap: 4px;
margin: 0 -8px;
padding: 0 8px;
}
.mp-export-item {
display: flex;
align-items: center;
padding: 8px;
border-radius: var(--mp-border-radius-md);
transition: background 0.15s;
cursor: pointer;
border: 1px solid transparent;
}
.mp-export-item:hover {
background-color: var(--mp-bg-tertiary);
border-color: var(--mp-border-primary);
}
.mp-item-content {
display: flex;
flex-direction: column;
overflow: hidden;
margin-left: 12px;
}
.mp-item-title {
font-size: 14px;
font-weight: 500;
color: var(--mp-text-primary);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.mp-item-preview {
font-size: 12px;
color: var(--mp-text-tertiary);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
margin-top: 2px;
}
.mp-export-buttons {
display: flex;
gap: 10px;
margin-top: 20px;
justify-content: flex-end;
border-top: 1px solid var(--mp-border-primary);
padding-top: 16px;
flex-shrink: 0;
}
/* Dinâmico */
#__ap_placeholders_container {
padding: 4px;
margin-top: 15px;
box-sizing: border-box;
transition: padding-top 0.2s ease;
}
.mp-option-group {
display: flex;
flex-direction: column;
gap: 4px;
margin-bottom: 12px;
padding: 8px;
border: 1px solid var(--mp-border-primary);
border-radius: var(--mp-border-radius-md);
background-color: var(--mp-bg-tertiary);
max-height: none !important;
overflow: visible !important;
}
.mp-option-item {
display: flex;
align-items: center;
gap: 10px;
font-size: 13px;
cursor: pointer;
padding: 8px 8px 8px 12px !important;
border-radius: var(--mp-border-radius-sm);
background-color: var(--mp-bg-primary);
transition: background-color 0.2s;
user-select: none;
border-left: 5px solid transparent;
position: relative;
}
.mp-option-item:hover {
background-color: var(--mp-bg-secondary);
}
/* Modo Expandido */
.mp-modal-box.mp-expanded #__ap_placeholders_container {
max-height: none !important;
height: 100% !important;
flex: 1;
display: flex;
flex-direction: column;
min-height: 0;
}
.mp-modal-box.mp-expanded #__ap_placeholders_container .mp-scroll-wrapper {
height: 100% !important;
flex: 1;
}
.dynamic-input {
min-height: 45px !important;
line-height: 1.5;
}
/* Idiomas */
.lang-box {
width: min(90vw, 320px);
}
.lang-button {
all: unset;
box-sizing: border-box;
display: block;
width: 100%;
padding: 12px 20px;
border-radius: var(--mp-border-radius-md);
background-color: var(--mp-bg-secondary);
color: var(--mp-text-primary);
border: 1px solid var(--mp-border-primary);
font-weight: 500;
cursor: pointer;
text-align: center;
transition: all 0.2s ease;
font-family: var(--mp-font-family-base) !important;
flex-shrink: 0;
}
.lang-button:hover {
transform: translateY(-2px);
box-shadow: var(--mp-shadow-sm);
background-color: var(--mp-bg-tertiary);
}
.lang-button.selected {
border-color: var(--mp-accent-primary);
color: var(--mp-accent-primary);
background-color: color-mix(in srgb, var(--mp-accent-primary) 5%, transparent);
font-weight: 600;
}
/* ---BOTÕES PRINCIPAIS--- */
.save-button {
padding: 10px 28px;
border-radius: var(--mp-border-radius-md);
background-color: var(--mp-accent-primary);
color: #fff;
border: none;
font-weight: 600;
cursor: pointer;
transition: all 0.2s ease-in-out;
font-family: var(--mp-font-family-base) !important;
}
.save-button:hover {
background-color: var(--mp-accent-primary-hover);
transform: translateY(-1px);
}
.mp-btn-secondary {
background: transparent;
border: 1px solid var(--mp-border-secondary);
color: var(--mp-text-secondary);
}
.mp-btn-secondary:hover {
background-color: var(--mp-bg-tertiary);
color: var(--mp-text-primary);
}
/* ---TABELA DE INFORMAÇÕES--- */
.mp-info-table {
display: flex;
flex-direction: column;
border: 1px solid var(--mp-border-primary);
border-radius: var(--mp-border-radius-md);
overflow: hidden;
margin-top: 8px;
}
.mp-info-row {
display: flex;
text-align: center;
}
.mp-info-row:not(:last-child) {
border-bottom: 1px solid var(--mp-border-primary);
}
.mp-info-col {
padding: 16px;
flex: 1;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.mp-info-col:not(:last-child) {
border-right: 1px solid var(--mp-border-primary);
}
.mp-info-col h3 {
font-size: 14px;
font-weight: 600;
color: var(--mp-text-primary);
margin: 0 0 8px;
}
.mp-info-col p {
font-size: 13px;
color: var(--mp-text-secondary);
line-height: 1.5;
margin: 0;
}
/* ---BUSCA DIFUSA--- */
.mp-inline-menu {
position: fixed;
width: 300px;
max-height: 250px;
background-color: var(--mp-bg-primary) !important;
border: 1px solid var(--mp-border-primary);
border-radius: var(--mp-border-radius-md);
box-shadow: var(--mp-shadow-lg);
z-index: 2147483647 !important;
display: flex;
flex-direction: column;
opacity: 0;
visibility: hidden;
transform: translateY(10px);
transition: opacity 0.1s, transform 0.1s, visibility 0s linear 0.1s;
overflow: hidden;
font-family: var(--mp-font-family-base) !important;
}
.mp-inline-menu.visible {
opacity: 1;
visibility: visible;
transform: translateY(0);
transition-delay: 0s;
}
.mp-inline-list {
display: flex;
flex-direction: column;
padding: 4px;
pointer-events: auto;
}
.mp-inline-item {
padding: 8px 12px;
cursor: pointer;
border-radius: var(--mp-border-radius-sm);
font-size: 13px;
color: var(--mp-text-primary);
display: flex;
align-items: center;
justify-content: space-between;
transition: background-color 0.1s;
}
.mp-inline-item:hover {
background-color: var(--mp-bg-tertiary);
}
.mp-inline-item.selected {
background-color: var(--mp-accent-primary);
color: #ffffff !important;
}
.mp-inline-title {
font-weight: 500;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 100%;
}
/* ---EXTRAS (Tooltips, Empty States, Animações)--- */
.mp-tooltip {
position: fixed;
z-index: 2147483647;
pointer-events: none;
display: flex;
flex-direction: column;
align-items: center;
width: max-content;
opacity: 0;
transform: scale(0.95) translateY(4px);
transition: opacity 150ms cubic-bezier(0.4, 0, 0.2, 1), transform 150ms cubic-bezier(0.4, 0, 0.2, 1);
}
.mp-tooltip.visible {
opacity: 1;
transform: scale(1) translateY(0);
}
.mp-tooltip-content {
background-color: var(--mp-text-primary);
color: var(--mp-bg-primary);
padding: 5px 10px;
border-radius: var(--mp-border-radius-sm);
white-space: nowrap;
font-family: var(--mp-font-family-base) !important;
font-size: 12px;
font-weight: 500;
box-shadow: var(--mp-shadow-md);
line-height: 1.2;
}
.mp-tooltip-arrow {
width: 0;
height: 0;
border-left: 5px solid transparent;
border-right: 5px solid transparent;
margin: 0 auto;
}
.mp-tooltip-top .mp-tooltip-arrow {
border-top: 5px solid var(--mp-text-primary);
margin-top: -1px;
}
.mp-tooltip-bottom .mp-tooltip-arrow {
border-bottom: 5px solid var(--mp-text-primary);
margin-bottom: -1px;
order: -1;
}
.empty-state {
padding: 24px 16px;
text-align: center;
color: var(--mp-text-tertiary);
font-size: 14px;
}
@keyframes mp-fade-in-up {
from {
opacity: 0;
transform: translateY(10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
`);
document.head.appendChild(styleElement);
}
// #endregion GLOBAL
// #region BOTÕES DE PROMPT
// ---CHATGPT---
function createChatGPTButton() {
const btn = document.createElement('button');
btn.type = 'button';
btn.setAttribute('data-testid', 'composer-button-prompts');
btn.className = 'composer-btn';
setSafeInnerHTML(btn, ``);
createCustomTooltip(btn, getTranslation('prompts'));
return btn;
}
// ---DEEPSEEK---
function createDeepseekButton() {
const styleId = 'uni-btn-deepseek-v2';
if (!document.getElementById(styleId)) {
const style = document.createElement('style');
style.id = styleId;
style.textContent = `.uni-btn-deepseek-v2 {display: inline-flex;align-items: center;justify-content: center;box-sizing: border-box;height: 32px;cursor: pointer;gap: 4px;}.uni-btn-deepseek-v2 svg { display: block; }`;
document.head.appendChild(style);
}
const btn = document.createElement('div');
btn.setAttribute('role', 'button');
btn.setAttribute('aria-disabled', 'false');
btn.setAttribute('tabindex', '0');
btn.className = 'ds-atom-button ds-toggle-button ds-toggle-button--md uni-btn-deepseek-v2';
btn.setAttribute('data-testid', 'composer-button-prompts');
const iconDiv = document.createElement('div');
iconDiv.className = 'ds-icon ds-atom-button__icon';
iconDiv.style.cssText = 'font-size: 14px; width: 14px; height: 14px; color: var(--dsw-alias-label-primary); margin-right: 4px; display: flex; align-items: center; justify-content: center;';
const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
svg.setAttribute('width', '14'); svg.setAttribute('height', '14');
svg.setAttribute('viewBox', '0 0 20 20'); svg.setAttribute('fill', 'none');
const path = document.createElementNS('http://www.w3.org/2000/svg', 'path');
path.setAttribute('d', 'M4 5h12M4 10h12M4 15h12');
path.setAttribute('stroke', 'currentColor');
path.setAttribute('stroke-width', '2');
svg.appendChild(path);
iconDiv.appendChild(svg);
const textWrapper = document.createElement('span');
const textInner = document.createElement('span');
textInner.textContent = getTranslation('prompts');
textWrapper.appendChild(textInner);
const focusRing = document.createElement('div');
focusRing.className = 'ds-focus-ring';
btn.appendChild(iconDiv);
btn.appendChild(textWrapper);
btn.appendChild(focusRing);
return btn;
}
// ---GOOGLE AI STUDIO---
function createGoogleAIStudioButton() {
const styleId = 'uni-ai-btn-style';
if (!document.getElementById(styleId)) {
const style = document.createElement('style');
style.id = styleId;
style.textContent = `.uni-ai-btn {display: inline-flex; align-items: center; justify-content: center;box-sizing: border-box; width: 32px; height: 32px; border-radius: 50%;border: 1px solid transparent; background: transparent; cursor: pointer;color: currentColor; transition: all 0.2s ease; margin-right: 4px;position: relative; z-index: 10;}.uni-ai-btn:hover { background-color: rgba(125, 125, 125, 0.15); }.uni-ai-btn svg { display: block; }`;
document.head.appendChild(style);
}
const btn = document.createElement('button');
btn.className = 'uni-ai-btn';
btn.setAttribute('data-testid', 'composer-button-prompts');
btn.setAttribute('aria-label', getTranslation('prompts'));
const span = document.createElement('span');
span.style.display = 'flex';
const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
svg.setAttribute('width', '24');
svg.setAttribute('height', '24');
svg.setAttribute('viewBox', '0 0 20 20');
svg.setAttribute('fill', 'none');
const path = document.createElementNS('http://www.w3.org/2000/svg', 'path');
path.setAttribute('d', 'M4 5h12M4 10h12M4 15h12');
path.setAttribute('stroke', 'currentColor');
path.setAttribute('stroke-width', '2');
svg.appendChild(path);
span.appendChild(svg);
btn.appendChild(span);
createCustomTooltip(btn, getTranslation('prompts'));
return btn;
}
// ---QWEN---
function createQwenButton() {
const btn = document.createElement('div');
btn.className = 'chat-input-feature-btn';
btn.setAttribute('data-testid', 'composer-button-prompts');
btn.style.cursor = 'pointer';
setSafeInnerHTML(btn, `${getTranslation('prompt')}`);
return btn;
}
// ---Z.AI---
function createZaiButton() {
const btnWrapper = document.createElement('div');
setSafeInnerHTML(btnWrapper, ``);
const btn = btnWrapper.firstElementChild;
btn.setAttribute('data-testid', 'composer-button-prompts');
return btn;
}
// ---GEMINI---
function createGeminiButton() {
const btn = document.createElement('button');
btn.setAttribute('data-testid', 'composer-button-prompts');
btn.className = 'mdc-icon-button mat-mdc-icon-button mat-mdc-button-base mat-primary mat-mdc-tooltip-trigger';
const svgHTML = ``;
setSafeInnerHTML(btn, svgHTML);
createCustomTooltip(btn, getTranslation('prompt'));
return btn;
}
// ---LMARENA---
function createLmarenaButton() {
const btn = document.createElement('button');
btn.setAttribute('data-testid', 'composer-button-prompts');
btn.className = 'inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring ring-offset-2 focus-visible:ring-offset-surface-primary disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 text-interactive-active border border-border-faint bg-transparent active:text-text-tertiary touch-hitbox group/modality-button hover:text-interactive-active relative h-8 w-8 rounded-md py-2 pl-2 pr-2 transition-colors duration-150 ease-out active:transition-transform active:duration-75 hover:bg-interactive-normal/10 hover:border-interactive-normal/10';
btn.type = 'button';
btn.setAttribute('aria-label', 'Prompts');
btn.setAttribute('data-state', 'closed');
btn.setAttribute('data-slot', 'tooltip-trigger');
setSafeInnerHTML(btn, ``);
createCustomTooltip(btn, getTranslation('prompt'));
return btn;
}
// ---KIMI---
function createKimiButton() {
const styleId = 'uni-kimi-style';
if (!document.getElementById(styleId)) {
const style = document.createElement('style');
style.id = styleId;
style.textContent = `.uni-kimi-btn {display: flex; align-items: center; justify-content: center;width: 32px; height: 32px;border-radius: 8px;cursor: pointer;background: transparent;color: var(--Labels-Secondary, #666);transition: background-color 0.3s ease-in-out;}.uni-kimi-btn:hover {background-color: var(--Fills-F1, rgba(0,0,0,0.05));}.uni-kimi-btn svg { display: block; }`;
document.head.appendChild(style);
}
const btn = document.createElement('div');
btn.className = 'icon-button toolkit-trigger-btn uni-kimi-btn';
btn.setAttribute('data-v-10d40aa8', '');
btn.setAttribute('data-v-7f585946', '');
btn.style.width = '32px';
btn.style.height = '32px';
btn.setAttribute('role', 'button');
btn.setAttribute('data-testid', 'composer-button-prompts');
btn.setAttribute('aria-label', getTranslation('prompts'));
const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
svg.setAttribute('width', '18'); svg.setAttribute('height', '18');
svg.setAttribute('viewBox', '0 0 20 20'); svg.setAttribute('fill', 'none');
const path = document.createElementNS('http://www.w3.org/2000/svg', 'path');
path.setAttribute('d', 'M4 5h12M4 10h12M4 15h12');
path.setAttribute('stroke', 'currentColor');
path.setAttribute('stroke-width', '2');
path.setAttribute('stroke-linecap', 'round');
svg.appendChild(path);
btn.appendChild(svg);
createCustomTooltip(btn, getTranslation('prompts'));
return btn;
}
// ---CLAUDE---
function createClaudeButton() {
const styleId = 'uni-icon-btn-claude';
if (!document.getElementById(styleId)) {
const style = document.createElement('style');
style.id = styleId;
style.textContent = `.uni-icon-btn-claude {display: inline-flex; align-items: center; justify-content: center;box-sizing: border-box;cursor: pointer;}.uni-icon-btn-claude svg { pointer-events: none; }`;
document.head.appendChild(style);
}
const btn = document.createElement('button');
btn.className = `uni-icon-btn-claude inline-flex items-center justify-center relative shrink-0 transition-all duration-200 h-8 w-8 rounded-lg text-text-300 hover:text-text-200 hover:bg-bg-200 active:scale-95 can-focus select-none`;
btn.setAttribute('data-testid', 'composer-button-prompts');
btn.setAttribute('aria-label', getTranslation('prompts'));
btn.type = 'button';
const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
svg.setAttribute('width', '20');
svg.setAttribute('height', '20');
svg.setAttribute('viewBox', '0 0 20 20');
svg.setAttribute('fill', 'none');
const path = document.createElementNS('http://www.w3.org/2000/svg', 'path');
path.setAttribute('d', 'M4 5h12M4 10h12M4 15h12');
path.setAttribute('stroke', 'currentColor');
path.setAttribute('stroke-width', '2');
svg.appendChild(path);
btn.appendChild(svg);
createCustomTooltip(btn, getTranslation('prompts'));
return btn;
}
// ---GROK---
function createGrokButton() {
const btn = document.createElement('button');
btn.type = 'button';
btn.setAttribute('data-testid', 'composer-button-prompts');
const btnHTML = ``;
setSafeInnerHTML(btn, btnHTML);
createCustomTooltip(btn, getTranslation('prompts'));
return btn;
}
// ---PERPLEXITY---
function createPerplexityButton() {
const span = document.createElement('span');
span.innerHTML = ``;
const innerBtn = span.querySelector('button');
createCustomTooltip(innerBtn, getTranslation('prompts'));
return span;
}
/* ---DOUBAO---
=================================================
特别感谢 @xiaolongmr 的贡献!
了解他的工作:https://greasyfork.org/users/1005301
感谢合作!🇧🇷🤝🇨🇳
=================================================
*/
function createDoubaoButton(variant = 'default') {
const wrapper = document.createElement('div');
wrapper.className = '';
let classes = "semi-button medium-VC3b8a icon-hKywyK icon-only-BL0gii button-EWcT9p semi-button-with-icon semi-button-with-icon-only";
let extraStyle = "";
if (variant === 'minimal') {
classes += " semi-button-tertiary semi-button-borderless";
extraStyle = "color: #070707ff;";
} else {
classes += " semi-button-primary samantha-button-BghSMg tertiary-o1h39p";
}
const btnHTML = ``;
setSafeInnerHTML(wrapper, btnHTML);
const btn = wrapper.querySelector('button');
createCustomTooltip(btn, getTranslation('prompts'));
return wrapper;
}
// ---BOTÃO DE AVISO DOUBAO FIREFOX---
function createDoubaoWarningButton(variant = 'default') {
const wrapper = document.createElement('div');
let classes = "semi-button medium-VC3b8a icon-hKywyK icon-only-BL0gii button-EWcT9p semi-button-with-icon semi-button-with-icon-only";
let extraStyle = "color: #f97316 !important;";
if (variant === 'minimal') {
classes += " semi-button-tertiary semi-button-borderless";
} else {
classes += " semi-button-primary samantha-button-BghSMg tertiary-o1h39p";
}
const btnHTML = ``;
setSafeInnerHTML(wrapper, btnHTML);
const btn = wrapper.querySelector('button');
createCustomTooltip(btn, getTranslation('ffWarningTitle'));
return wrapper;
}
// ---LONGCAT---
function createLongCatButton() {
const wrapper = document.createElement('div');
wrapper.className = 'upload-button-content';
wrapper.setAttribute('data-v-625d7fb6', '');
wrapper.setAttribute('data-v-6f28d2aa', '');
wrapper.setAttribute('data-v-4eeb4222-s', '');
wrapper.style.flexShrink = '0';
wrapper.style.cursor = 'pointer';
const btnHTML = `
${getTranslation('infoDPDesc')}
${getTranslation('infoASDesc')}
${getTranslation('ffWarningText')}
${getTranslation('ffRecommend')}