ChatGPT Widescreen Mode 🖥️

Enhances ChatGPT with wide/full/tall-screen + spamblock modes. Also works on perplexity.ai + poe.com!

Install this script?
Author's suggested script

You may also like Autoclear ChatGPT History.

Install this script
// ==UserScript==
// @name                ChatGPT Widescreen Mode 🖥️
// @name:af             ChatGPT Widescreen Modus 🖥️
// @name:am             ቻትጂፒቲ ሰፊ ስክሪን 🖥️
// @name:ar             ChatGPT وضع شاشة عريضة 🖥️
// @name:az             ChatGPT Geniş Ekran Rejimi 🖥️
// @name:be             ChatGPT Рэжым шырокага экрана 🖥️
// @name:bem            ChatGPT Icikope Icakulisha 🖥️
// @name:bg             ChatGPT Широкоекранен режим 🖥️
// @name:bn             ChatGPT উইডস্ক্রিন মোড 🖥️
// @name:bo             ChatGPT རྒྱུ་ཆེན་གཞི་བསྒྲུབ་ རྒྱལ་བཤད། 🖥️
// @name:bs             ChatGPT Režim širokog ekrana 🖥️
// @name:ca             ChatGPT Mode de pantalla ampla 🖥️
// @name:ceb            ChatGPT Lapadscreen 🖥️
// @name:ckb            ChatGPT دەستکاری چوارچێوەی ڕووکاری 🖥️
// @name:cs             ChatGPT Režim širokoúhlé obrazovky 🖥️
// @name:cy             ChatGPT Mod Sgrin Lled 🖥️
// @name:da             ChatGPT Bredformat-tilstand 🖥️
// @name:de             ChatGPT Breitbildmodus 🖥️
// @name:dv             ChatGPT ވިސްނުވެއް މޯޑި 🖥️
// @name:dz             ChatGPT འབྲེལ་བ་གཞུང་ལས་སྤྱི་ཚོགས་གླེང་། 🖥️
// @name:el             ChatGPT Λειτουργία ευρείας οθόνης 🖥️
// @name:eo             ChatGPT Larĝekrana reĝimo 🖥️
// @name:es             ChatGPT Modo de pantalla panorámica 🖥️
// @name:et             ChatGPT Laiarakenduse režiim 🖥️
// @name:eu             ChatGPT Pantaila Zabalaren Modua 🖥️
// @name:fa             ChatGPT حالت تلویزیونی 🖥️
// @name:fi             ChatGPT Laajakuva-tila 🖥️
// @name:fo             ChatGPT Búðarformaður háttur 🖥️
// @name:fr             ChatGPT Mode Écran Large 🖥️
// @name:fr-CA          ChatGPT Mode Écran Large 🖥️
// @name:gd             ChatGPT Dreach-sgrìn Leud 🖥️
// @name:gl             ChatGPT Modo de pantalla ancha 🖥️
// @name:gu             ChatGPT પ્રશાંત સ્ક્રીન મોડ 🖥️
// @name:haw            ChatGPT Widescreen 🖥️
// @name:he             ChatGPT מצב מסך רחב 🖥️
// @name:hi             ChatGPT चहचटजीपटी वाइडस्क्रीन मोड 🖥️
// @name:hr             ChatGPT Način širokog zaslona 🖥️
// @name:ht             ChatGPT Mod Fomat Gwo 🖥️
// @name:hu             ChatGPT Szélesvásznú mód 🖥️
// @name:hy             ChatGPT լայնէկրանանշանի ռեժիմ 🖥️
// @name:id             ChatGPT Mode Layar Lebar 🖥️
// @name:is             ChatGPT Breiðskjásstilling 🖥️
// @name:it             ChatGPT Modalità schermo panoramica 🖥️
// @name:ja             ChatGPT ワイドスクリーンモード 🖥️
// @name:jv             ChatGPT Mode Layar Lebar 🖥️
// @name:ka             ChatGPT ფანტსარიშის რეჟიმი 🖥️
// @name:kab            ChatGPT Amezwaru n Tikliwin Isellalen 🖥️
// @name:kk             ChatGPT Көлеңкескен түрі 🖥️
// @name:km             ChatGPT របៀបបង្អស្សមួយធ្វើដំបូង 🖥️
// @name:kn             ChatGPT ChatGPT ವೈಡ್ಸ್ಕ್ರೀನ್ ಮೋಡ್ 🖥️
// @name:ko             ChatGPT 와이드 스크린 모드 🖥️
// @name:ku             ChatGPT Moda Pêlên Dirêj 🖥️
// @name:ky             ChatGPT Жогорку Экрандык Режим 🖥️
// @name:la             ChatGPT Modus Latus Plenus 🖥️
// @name:lb             ChatGPT Breitbild-Modus 🖥️
// @name:lo             ChatGPT ຮູບແບບໂປຣຟອນໃຫຍ່ 🖥️
// @name:lt             ChatGPT Išplėstojo ekrano režimas 🖥️
// @name:lv             ChatGPT Plašā ekrāna režīms 🖥️
// @name:mg             ChatGPT Tarehimarika tamin'ny Widescreen 🖥️
// @name:mi             ChatGPT Āhua Whātika ā-Raupapa 🖥️
// @name:mk             ChatGPT Режим на широк екран 🖥️
// @name:ml             ChatGPT വൈഡ്സ്ക്രീൻ മോഡ് 🖥️
// @name:mn             ChatGPT Жинхэнэ Экранны Арга 🖥️
// @name:mr             चॅटजीपीटी वाइडस्क्रीन 🖥️
// @name:ms             ChatGPT Mod Skrin Lebar 🖥️
// @name:mt             ChatGPT Modalità Widescreen 🖥️
// @name:my             ChatGPT အများနှုန်းကျော်ဘုံ 🖥️
// @name:ne             ChatGPT विस्तृत प्राण्डविक पद्धति 🖥️
// @name:nl             ChatGPT Breedbeeldmodus 🖥️
// @name:no             ChatGPT Bredskjermmodus 🖥️
// @name:ny             ChatGPT Mawonekedwe Wathandiza 🖥️
// @name:pa             ChatGPT ਵਾਇਡਸਕ੍ਰੀਨ ਮੋਡ 🖥️
// @name:pl             ChatGPT Tryb szerokoekranowy 🖥️
// @name:ps             ChatGPT د ډیسپلې موډ 🖥️
// @name:pt             ChatGPT Modo Tela Larga 🖥️
// @name:pt-BR          ChatGPT Modo Tela Larga 🖥️
// @name:ro             ChatGPT Mod ecran lat 🖥️
// @name:ru             ChatGPT Режим широкоформатного экрана 🖥️
// @name:rw             ChatGPT Ibindi by'umuhondo bw'ishusho 🖥️
// @name:sg             ChatGPT Mode Écran Large 🖥️
// @name:si             ChatGPT විශේෂාංග පෙළක්ෂාව 🖥️
// @name:sk             ChatGPT Režim širokouhlého displeja 🖥️
// @name:sl             ChatGPT Način širokega zaslona 🖥️
// @name:sm             ChatGPT Laititi Fuamatala 🖥️
// @name:sn             ChatGPT Zvimwe Zvitsva Mode 🖥️
// @name:so             ChatGPT hab Widescreen Mode 🖥️
// @name:sq             ChatGPT me ekran të gjerë 🖥️
// @name:sr             ChatGPT Режим широког екрана 🖥️
// @name:st             ChatGPT Skrene e Phara 🖥️
// @name:sv             ChatGPT Bredbildsläge 🖥️
// @name:sw             ChatGPT Njia ya Skrini Panoramio 🖥️
// @name:ta             ChatGPT விரிவான திரை முறை 🖥️
// @name:te             ChatGPT ChatGPT వైడ్ స్క్రీన్ మోడ్ 🖥️
// @name:tg             ChatGPT Возачи Режаи Дисплеи Барнома 🖥️
// @name:th             ChatGPT โหมดหน้าจอแบบเต็มจอ 🖥️
// @name:ti             ቻትጂፒቲ ዋይድስክሪን ሞድ 🖥️
// @name:tk             ChatGPT Giň Ekran Tertibi 🖥️
// @name:tl             ChatGPT Malapad na Screen 🖥️
// @name:tn             ChatGPT Nyemba Yemba Mzizo 🖥️
// @name:to             ChatGPT Moli ʻo e Ngaahi Fatongi ʻo Haʻaneesi 🖥️
// @name:tr             ChatGPT Geniş Ekran Modu 🖥️
// @name:tt             ChatGPT киң экран 🖥️
// @name:ug             ChatGPT keng ekran 🖥️
// @name:uk             ChatGPT Режим широкого екрана 🖥️
// @name:ur             ChatGPT وائڈ اسکرین موڈ 🖥️
// @name:uz             ChatGPT Keng ekranga rejim 🖥️
// @name:vi             ChatGPT Chế độ Màn hình Rộng 🖥️
// @name:wo             ChatGPT écran large 🖥️
// @name:xh             ChatGPT Indlela ye-Widescreen Mode 🖥️
// @name:yi             ChatGPT ווידעסקרעען מאָדע 🖥️
// @name:yo             Wide iboju 🖥️ ChatGPT
// @name:zh             ChatGPT 宽屏模式 🖥️
// @name:zh-CN          ChatGPT 宽屏模式 🖥️
// @name:zh-HK          ChatGPT 寬螢幕模 🖥️
// @name:zh-SG          ChatGPT 宽屏模式 🖥️
// @name:zh-TW          ChatGPT 寬螢幕模 🖥️
// @name:zu             ChatGPT Isimo sokudlalwa emkhumbini 🖥️
// @description         Enhances ChatGPT with wide/full/tall-screen + spamblock modes. Also works on perplexity.ai + poe.com!
// @description:af      Verbetert ChatGPT met breë/volle/lang-skerm + spamblokkeringsmodusse. Werk ook op perplexity.ai + poe.com!
// @description:am      ቻትጂፒቲን በትልቅ/ሙሉ/ረጅም ስክሪን + ስፓም ብሎክ ሞዶች ይማራል። በperplexity.ai + poe.com ላይም ይሰራል!
// @description:ar      يعزز ChatGPT مع أوضاع الشاشة الواسعة / الكاملة / الطويلة + وضع حظر الرسائل المزعجة. يعمل أيضًا على perplexity.ai + poe.com!
// @description:az      ChatGPT-ni geniş/dolğu/yüksək ekran + spam bloklama rejimləri ilə təkmilləşdirir. Həmçinin perplexity.ai + poe.com-da işləyir!
// @description:be      Палепшыць ChatGPT з рэжымамі шырокі/поўны/высокі экран + блокаванне спаму. Таксама працуе на perplexity.ai + poe.com!
// @description:bem     ChatGPT ikalishe na mawodi ya kufyala/kukwata/manyefu + spamblock. Ikaba na ntchito ku perplexity.ai + poe.com!
// @description:bg      Подобрява ChatGPT с режими за широк екран/пълен/висок + блокиране на спам. Работи също на perplexity.ai + poe.com!
// @description:bn      চ্যাটজিপিটি কে প্রশস্ত/পূর্ণ/উচ্চ-স্ক্রীন + স্প্যামব্লক মোডের সাথে উন্নত করে। এটি perplexity.ai + poe.com-এও কাজ করে!
// @description:bo      ChatGPTའདི་ལུང་བརྗེད་འཕྲིན་སྐོར་དབྱར་ཆེན་སྐོར་འདི་ཡིན་ནི་ཁ་ལོག་+ spamblock མཉམ་སྒོའི་མཐར་ཕྱོགས་མཛད་ཡིན། perplexity.ai + poe.com་ལ་འགྱོ་ཡིན།
// @description:bs      Poboljšava ChatGPT s režimima širokog/punog/visokog ekrana + blokade spama. Također radi na perplexity.ai + poe.com!
// @description:ca      Millora ChatGPT amb modes d'écran ampli/complet/alt + modes de bloqueig de correu brossa. També funciona a perplexity.ai + poe.com!
// @description:ceb     Nagpalambo sa ChatGPT gamit ang lapad/puno/taas-screen + spamblock nga mga mode. Nagtrabaho usab kini sa perplexity.ai + poe.com!
// @description:ckb     پارەکەری دەکات ChatGPT بە ڕووکاری وشەی کەسەرە/کامل/بەرز + ڕووکاری پەڕەی ڕووكارەوە. هەروەها کاردەکاتە سەر perplexity.ai + poe.com!
// @description:cs      Vylepšuje ChatGPT s režimy širokého/plného/vysokého displeje + blokování spamu. Také funguje na perplexity.ai + poe.com!
// @description:cy      Gwella ChatGPT gyda fodiwlau sgrin eang/lawn/uchel + blocio sbam. Mae'n gweithio hefyd ar perplexity.ai + poe.com!
// @description:da      Forbedrer ChatGPT med brede/fulde/høje skærm + spamblock-modes. Virker også på perplexity.ai + poe.com!
// @description:de      Erweitert ChatGPT mit breiten/vollen/großen Bildschirm- und Spamblock-Modi. Funktioniert auch auf perplexity.ai + poe.com!
// @description:dv      ކަމަށް ChatGPT މެއްދައްކާ ދެއްވިފައިވަން / ފަލްލާލް / ހަމަކޮށް ބަށަލަތް + ސްޕެމބލޮކް މޮދުންގެންޓެކަށް އެލެކް ކައިވެލް perplexity.ai + poe.com!
// @description:dz      འཕེལ་འབྱོར་ལས ChatGPT ནི་རོགས་བཏོད་འབུལ་མཉམ་ནོར་འཛུལ་སྒོར་དབྱར་དགོན་/འཛིང་སྒོར་སྤུས་ནང་མཐར་ཕྱོགས་ལེགས་རོགས་ཡིན། perplexity.ai + poe.com་ནང་འཁོད་འཇུག་ཡིན།
// @description:el      Ενισχύει το ChatGPT με λειτουργίες ευρείας/πλήρους/υψηλής οθόνης + μπλοκ αποστολής ανεπιθύμητης αλληλογραφίας. Λειτουργεί επίσης στο perplexity.ai + poe.com!
// @description:eo      Plibonigas ChatGPT kun larĝa/plena/alta ekrano + blokado de spamo. Ankaŭ funkcias ĉe perplexity.ai + poe.com!
// @description:es      Mejora ChatGPT con modos de pantalla ancha/completa/alta + modo de bloqueo de spam. También funciona en perplexity.ai + poe.com!
// @description:et      Parandab ChatGPT lai lai/terve/täiesti-ekraani + spämmi blokeerimisrežiimid. Töötab ka perplexity.ai + poe.com!
// @description:eu      Hobetzen du ChatGPT zabala/oso/altua pantaila + spam blokeatzeko moduekin. Perplexity.ai + poe.com-n ere funtzionatzen du!
// @description:fa      ChatGPT را با حالت های صفحه عریض/تمام/بلند + مسدودسازی هرزنامه بهبود می بخشد. همچنین در perplexity.ai + poe.com کار می کند!
// @description:fi      Parantaa ChatGPT:tä laaja/ täysi/ korkea näyttö + roskapostin estäminen -tiloilla. Toimii myös perplexity.ai + poe.com!
// @description:fo      Bætir ChatGPT við breiðum/fullum/háum skjá + ruslpósthemlunaraðgerðum. Virkar einnig á perplexity.ai + poe.com!
// @description:fr      Améliore ChatGPT avec les modes écran large/complet/grand + mode anti-spam. Fonctionne également sur perplexity.ai + poe.com !
// @description:fr-CA   Améliore ChatGPT avec les modes écran large/complet/grand + mode anti-spam. Fonctionne également sur perplexity.ai + poe.com !
// @description:gd      Leasaich ChatGPT le modhan scrion farsaing/làn/àrd + modan bacadh spàm. Bidh e ag obair cuideachd air perplexity.ai + poe.com!
// @description:gl      Mellora ChatGPT con modos de pantalla ancha/completa/alta + modo de bloqueo de spam. Tamén funciona en perplexity.ai + poe.com!
// @description:gu      ચેટજીપીટીને વ્યાપક/પૂર્ણ/ઊંચી સ્ક્રીન + સ્પામબ્લોક મોડ્સ સાથે સુધારે છે. તે perplexity.ai + poe.com પર પણ કાર્ય કરે છે!
// @description:haw     Hoʻololi i ka ChatGPT me nā ʻano pālākiō / piha / kiʻekiʻe + nā ʻano pāpā spam. Hana pū kēia ma perplexity.ai + poe.com!
// @description:he      משדרג את ChatGPT עם מצבי מסך רחב/מלא/גבוה + חסימת דואר זבל. עובד גם ב-perplexity.ai + poe.com!
// @description:hi      चैटजीपीटी को चौड़े/पूर्ण/लंबे स्क्रीन + स्पैमब्लॉक मोड के साथ सुधारता है। यह perplexity.ai + poe.com पर भी काम करता है!
// @description:hr      Poboljšava ChatGPT s načinima širokog/punog/visokog ekrana + blokiranje neželjene pošte. Također radi na perplexity.ai + poe.com!
// @description:ht      Amelyore ChatGPT ak mòd ekran laj/pou/bonè + mod blokaj spam. Li travay tou sou perplexity.ai + poe.com!
// @description:hu      Fejleszti a ChatGPT-t széles/teljes/magas képernyős + spamblokkoló módokkal. A perplexity.ai + poe.com oldalon is működik!
// @description:hy      ChatGPT-ն բարելավում է լայն/պատասխանատու/բարձր էկրանի + սպամի բլոկավորման ռեժիմներով: Այն նաև գործում է perplexity.ai + poe.com-ում!
// @description:id      Meningkatkan ChatGPT dengan mode layar lebar/penuh/tinggi + mode pemblokiran spam. Juga bekerja di perplexity.ai + poe.com!
// @description:is      Bætir ChatGPT með breiðum/fullum/háum skjá + ruslpósthemlunaraðgerðum. Virkar einnig á perplexity.ai + poe.com!
// @description:it      Migliora ChatGPT con modalità schermo ampio/completo/alto + modalità di blocco spam. Funziona anche su perplexity.ai + poe.com!
// @description:ja      ChatGPTを広い/フル/高画面+スパムブロックモードで強化します。また、perplexity.ai + poe.comでも動作します!
// @description:jv      Ningkataké ChatGPT nganggo mode layar jembar/penuh/tinggi + mode blokir spam. Uga bisa digunakake ing perplexity.ai + poe.com!
// @description:ka      აუმჯობესებს ChatGPT-ს ფართო/სრული/სიმაღლის ეკრანის + სპამ-ბლოკირების რეჟიმებით. ასევე მუშაობს perplexity.ai + poe.com-ზე!
// @description:kab     Yernu ChatGPT s yimezda n uferq/aṭṭas/uzelmat di tgejdit. Tura yettsen-d deg perplexity.ai akked poe.com!
// @description:kk      ChatGPT-ні кең/толық/биік экран + спам блоктау режимдерімен жақсартады. Сонымен қатар, perplexity.ai + poe.com сайттарында жұмыс істейді!
// @description:km      បង្កើន ChatGPT ជាមួយម៉ូដអេក្រង់ទូលំទូលាយ/ពេញលេញ/កម្ពស់ + ម៉ូដប្លុកស្ពាម។ ក៏ដូចជាធ្វើការនៅលើ perplexity.ai + poe.com!
// @description:kn      ಚಾಟ್GPTನ್ನು ವಿಶಾಲ/ಪೂರ್ಣ/ಎತ್ತರದ-ಸ್ಕ್ರೀನ್ + ಸ್ಪ್ಯಾಮ್‌ಬ್ಲಾಕ್‌ ಮೋಡ್‌ಗಳೊಂದಿಗೆ ಸುಧಾರಿಸುತ್ತದೆ. ಇದು perplexity.ai + poe.com ನಲ್ಲಿ ಸಹ ಕಾರ್ಯನಿರ್ವಹಿಸುತ್ತದೆ!
// @description:ko      ChatGPT를 와이드/풀/높은 화면 + 스팸 차단 모드로 향상시킵니다. 또한 perplexity.ai + poe.com에서도 작동합니다!
// @description:ku      ChatGPT-ê bi modên pêşandanê nermal/temam/dirêj + spam-block veşart dike. Hêmû de li perplexity.ai + poe.com jî dixebite!
// @description:ky      ChatGPT-ni keng/temam/biyik ekran + spam-block rejimderi menen jaqsyrtady. Ol perplexity.ai + poe.com-da da ishleydi!
// @description:la      ChatGPT cum latum/plenum/altum screen + spam blockade modis emendatur. Etiam in perplexity.ai + poe.com operatur!
// @description:lb      ChatGPT mat weiten/ganz/hoechst Schirm + Spamblock Modi verbessert. Et funktionnéiert och op perplexity.ai + poe.com!
// @description:lo      ພັກພັນ ChatGPT ກັບສະກຣີນຫຼາຍ/ຄົບຮອບ/ສູງ + ມູດກັບສະປາມ. ມັນກະທຳງານຢູ່ perplexity.ai + poe.com!
// @description:lt      Patobulina ChatGPT su plačiais/visiškais/aukštais ekrano + spam blokavimo režimais. Taip pat veikia ant perplexity.ai + poe.com!
// @description:lv      Uzlabo ChatGPT ar plaša/pilna/augsta ekrāna + surogātprogrammu bloķēšanas režīmiem. Tāpat darbojas arī perplexity.ai + poe.com!
// @description:mg      Manatsara ChatGPT miaraka amin'ny fomba feno/sarotra/haavo + fanakanana spam. Miasa amin'ny perplexity.ai + poe.com koa!
// @description:mi      Whakarei i ChatGPT me ngā huarahi rahi/paerewa/teitei + he poke pātea. Kei te mahi hoki i runga i perplexity.ai + poe.com!
// @description:mk      Ја подобрува ChatGPT со режими за широк/полн/висок екран + блокирање на спам. Работи и на perplexity.ai + poe.com!
// @description:ml      ചാറ്റ്‌ജിപിടി വിപുല/പൂര്‍ണ/ഉയര്‍ന്ന സ്ക്രീന്‍ + സ്‌പാം ബ്ലോക്ക് മോഡുകളോടെ മെച്ചപ്പെടുത്തുന്നു. ഇത് perplexity.ai + poe.com-ലും പ്രവര്‍ത്തിക്കുന്നു!
// @description:mn      ChatGPT-г өргөн/бүтэн/өндөр дэлгэц + спам блоклогч горимуудтай сайжруулна. Мөн perplexity.ai + poe.com дээр ажиллана!
// @description:mr      चैटGPTला विस्तृत/पूर्ण/उच्च-स्क्रीन + स्पॅम ब्लॉक मोडसह सुधारते. हे perplexity.ai + poe.com वर देखील कार्य करते!
// @description:ms      Meningkatkan ChatGPT dengan mod paparan lebar/penuh/tinggi + mod penyekatan spam. Ia juga berfungsi di perplexity.ai + poe.com!
// @description:mt      Ittejjeb ChatGPT bi modalità ta' skrin wiesgħa/piena/ogħla + modalità ta' blokkjar ta' spam. Jaħdem ukoll fuq perplexity.ai + poe.com!
// @description:my      ChatGPT ကို ကျယ်/ပြည့်/အရည်အချင်းပြည့်သော စကရင် + စပෑမ် ဘလော့ခ် မုဒ်များဖြင့် တိုးတက်စေသည်။ ဒါဟာ perplexity.ai + poe.com ပေါ်မှာလဲ အလုပ်လုပ်ပါတယ်!
// @description:ne      चौडाइ/पूर्ण/उचाइ-स्क्रीन + स्प्याम ब्लॉक मोडसहित ChatGPT लाई सुधार्नुहोस्। यो perplexity.ai + poe.com मा पनि काम गर्दछ!
// @description:nl      Verbetert ChatGPT met brede/volle/hoge scherm + spamblokkering modi. Werkt ook op perplexity.ai + poe.com!
// @description:no      Forbedrer ChatGPT med brede/full/høye skjerm + spamblock-modus. Også tilgjengelig på perplexity.ai + poe.com!
// @description:ny      Apanga ChatGPT ndi makonda a chinsalu cha ambiri/chonse/chikulu + njira zowononga spam. Imagwira ntchito pa perplexity.ai + poe.com!
// @description:pa      ਚੈਟਜੀਪੀਟੀ ਨੂੰ ਵਿਆਪਕ/ਪੂਰਨ/ਉੱਚ ਸਕ੍ਰੀਨ + ਸਪੈਮ ਬਲੌਕ ਮੋਡ ਨਾਲ ਸੁਧਾਰਦਾ ਹੈ। ਇਹ perplexity.ai + poe.com 'ਤੇ ਵੀ ਕੰਮ ਕਰਦਾ ਹੈ!
// @description:pl      Ulepsza ChatGPT za pomocą trybów szerokiego/pełnego/wysokiego ekranu + blokady spamu. Działa również na perplexity.ai + poe.com!
// @description:ps      ChatGPT ته د پراخ/مکمل/لوړ سکرین + سپیم بلاک کولو حالتونو سره وده ورکوي. دا په perplexity.ai + poe.com کې هم کار کوي!
// @description:pt      Melhora o ChatGPT com modos de tela larga/completa/alta + modos de bloqueio de spam. Também funciona em perplexity.ai + poe.com!
// @description:pt-BR   Melhora o ChatGPT com modos de tela larga/completa/alta + modos de bloqueio de spam. Também funciona em perplexity.ai + poe.com!
// @description:ro      Îmbunătățește ChatGPT cu moduri de ecran larg/complet/înalt + moduri de blocare a spamului. De asemenea, funcționează pe perplexity.ai + poe.com!
// @description:ru      Улучшает ChatGPT с режимами широкого/полного/высокого экрана и блокировки спама. Также работает на perplexity.ai + poe.com!
// @description:rw      Guhuza ChatGPT hamwe n'ibimenyetso bya ekran nini/bikozwe/byinshi + uburyo bwo gukumira spam. Kandi ikora ku perplexity.ai + poe.com!
// @description:sg      Améliore ChatGPT avec les modes d’écran large/complet/haut + le mode de blocage de spam. Fonctionne également sur perplexity.ai + poe.com!
// @description:si      ChatGPT එක විශාල/සම්පූර්ණ/ඉහළ-පෙරටු + ස්පාම් බ්ලොක් ක්‍රම මඟින් වැඩිදියුණු කරයි. මෙය perplexity.ai + poe.com හිද ක්‍රියාත්මක වේ!
// @description:sk      Zlepšuje ChatGPT s režimami širokého/plného/vysokého displeja + blokovanie spamu. Takéto funguje aj na perplexity.ai + poe.com!
// @description:sl      Izboljšuje ChatGPT z načini širokega/polnega/visokega zaslona + blokado neželene pošte. Prav tako deluje na perplexity.ai + poe.com!
// @description:sm      Fa'amaoniga ChatGPT i auala laupapa/puni/lamava + metotia o le 'spam' fa'atekinolosi. E fa'amaoni i perplexity.ai + poe.com!
// @description:sn      Zvikurudzira ChatGPT nehutungamiri hwepamusoro/huzhinji/hupfumi + matanho ekudzivirira spam. Zvinotora chirevo pa perplexity.ai + poe.com!
// @description:so      Hagaajinta ChatGPT iyadoo la adeegsanayo hababka shaashadda ballaaran/buuxa/sare + habka xanniba spam. Waxa kale oo ay ka shaqeysaa perplexity.ai + poe.com!
// @description:sq      Pëmirëson ChatGPT me modulet e ekranit të gjerë/të plotë/të lartë + bllokimin e spamit. Po ashtu punon në perplexity.ai + poe.com!
// @description:sr      Unapređuje ChatGPT sa režimima širokog/punog/visokog ekrana + blokadom spama. Takođe funkcioniše na perplexity.ai + poe.com!
// @description:st      Khothaletsa ChatGPT ka mekhoa ea skrine e kholo/e felletseng/e phahameng + mekhoa ea thibelo ea spam. E sebetsa hape ho perplexity.ai + poe.com!
// @description:sv      Förbättrar ChatGPT med bred/full/hög skärm + spamblock-lägen. Fungerar också på perplexity.ai + poe.com!
// @description:sw      Inaboresha ChatGPT kwa hali ya skrini pana/kamilifu/ya juu + hali ya kuzima spam. Pia inafanya kazi kwenye perplexity.ai + poe.com!
// @description:ta      ChatGPTஐ விரிவான/முழு/உயர்ந்த திரை + ஸ்பாம் தடுப்பு முறைமைகளுடன் மேம்படுத்துகிறது. இது perplexity.ai + poe.com இல் செயல்படுகிறது!
// @description:te      చాట్GPTని విస్తృత/పూర్ణ/ఎత్తు-స్క్రీన్ + స్పామ్ బ్లాక్ మోడ్‌లతో మెరుగుపరుస్తుంది. ఇది perplexity.ai + poe.comపై కూడా పని చేస్తుంది!
// @description:tg      ChatGPT-ро бо режими экранҳои васеъ/комил/баланд + блоки спам такмил медиҳад. Ҳамчунин дар perplexity.ai + poe.com кор мекунад!
// @description:th      ปรับปรุง ChatGPT ด้วยโหมดหน้าจอกว้าง/เต็ม/สูง + โหมดบล็อกสแปม ทำงานได้ที่ perplexity.ai + poe.com!
// @description:ti      ቻትጂፒቲን በስፋት/ሙሉ/ረጅም ስክሪን + ስፓም ብሎክ ሞዶች ይማራል። በperplexity.ai + poe.com ላይም ይሰራል!
// @description:tk      ChatGPT-ni giňişleýin/dolup/buýuk ekran + spam blokirlemek ýagdaýlarynda gowulandyrýar. Şeýle hem perplexity.ai + poe.com-da işleýär!
// @description:tl      Pinapabuti ang ChatGPT gamit ang mga mode ng malawak/puno/mataas na screen + mode ng pagharang sa spam. Gumagana rin ito sa perplexity.ai + poe.com!
// @description:tn      Tokafatsa ChatGPT ka ditsela tsa sehaweng se se pharaletseng/se felletseng/se phahameng + ditsela tsa ho thibela spam. E sebetsa hape ho perplexity.ai + poe.com!
// @description:to      Fa'amaonia ChatGPT i auala mata'itusi laupapa/puni/lamava + auala fa'amaoniga spam. E mafai foi ona fa'agaioi i perplexity.ai + poe.com!
// @description:tr      ChatGPT'yi geniş/tam/yüksek ekran + spam engelleme modlarıyla geliştirir. Ayrıca perplexity.ai + poe.com'da da çalışır!
// @description:tt      ChatGPT-ны киң/тулы/югары экран + спам блоклау режимнары белән яхшырта. Шул ук вакытта perplexity.ai + poe.com да эшли!
// @description:ug      ChatGPT'ni keng/to'liq/yuqori ekran + spam blokirovka rejimlari bilan yaxshilaydi. Shuningdek, perplexity.ai + poe.com saytlarida ishlaydi!
// @description:uk      Покращує ChatGPT за допомогою режимів широкого/повного/високого екрану + блокування спаму. Також працює на perplexity.ai + poe.com!
// @description:ur      چیٹ جی پی ٹی کو وسیع/مکمل/اونچی اسکرین + اسپام بلاک موڈ کے ساتھ بہتر کرتا ہے۔ یہ perplexity.ai + poe.com پر بھی کام کرتا ہے!
// @description:uz      ChatGPT-ni keng/to'liq/baland ekran + spam bloklash rejimlari bilan yaxshilaydi. Bundan tashqari, perplexity.ai + poe.com-da ham ishlaydi!
// @description:vi      Cải thiện ChatGPT với các chế độ màn hình rộng/toàn màn/hồ sơ cao + chế độ chặn spam. Cũng hoạt động trên perplexity.ai + poe.com!
// @description:wo      Jëfandikoo ChatGPT ak modu yu gëstu-gëstu/fini/gëstu guddi + mode spam-block. It works too on perplexity.ai + poe.com!
// @description:xh      Ukuphucula iChatGPT ngezithuba zesikrini ezibanzi/egcwele/ephezulu + imodi ye-spamblock. Isebenza ku-perplexity.ai + poe.com!
// @description:yi      אַוואַנסירטער ChatGPT מיט ברייט/גאַנץ/הויך-סקירן + ספּאַם בלאָק מאָדעס. עס אַרבעט אויך אויף perplexity.ai + poe.com!
// @description:yo      Ṣe ilọsiwaju ChatGPT pẹlu awọn ipo iboju jakejado/pipe/giga + ipo idiwọ spam. O tun n ṣiṣẹ lori perplexity.ai + poe.com!
// @description:zh      通过宽屏/全屏/高屏+垃圾邮件块模式增强 ChatGPT。也可以在 perplexity.ai + poe.com 上使用!
// @description:zh-CN   通过宽屏/全屏/高屏+垃圾邮件块模式增强 ChatGPT。也可以在 perplexity.ai + poe.com 上使用!
// @description:zh-HK   使用寬/全/高螢幕+垃圾郵件區塊模式增強 ChatGPT。也可以在 perplexity.ai + poe.com 上使用!
// @description:zh-SG   通过宽屏/全屏/高屏+垃圾邮件块模式增强 ChatGPT。也可以在 perplexity.ai + poe.com 上使用!
// @description:zh-TW   使用寬/全/高螢幕+垃圾郵件區塊模式增強 ChatGPT。也可以在 perplexity.ai + poe.com 上使用!
// @description:zu      Thuthukisa iChatGPT ngemodi zesikrini ezibanzi/egcwele/ephezulu + imodi yokuvimbela i-spam. Futhi isebenza ku-perplexity.ai + poe.com!
// @author              Adam Lui
// @namespace           https://github.com/adamlui
// @version             2025.1.1.3
// @license             MIT
// @icon                https://media.chatgptwidescreen.com/images/icons/widescreen-robot-emoji/icon48.png?9a393be
// @icon64              https://media.chatgptwidescreen.com/images/icons/widescreen-robot-emoji/icon64.png?9a393be
// @compatible          chrome
// @compatible          firefox
// @compatible          edge
// @compatible          opera
// @compatible          brave
// @compatible          vivaldi
// @compatible          librewolf
// @compatible          ghost
// @compatible          qq
// @match               *://chatgpt.com/*
// @match               *://chat.openai.com/*
// @match               *://*.perplexity.ai/*
// @match               *://poe.com/*
// @connect             cdn.jsdelivr.net
// @connect             update.greasyfork.org
// @require             https://cdn.jsdelivr.net/npm/@kudoai/chatgpt.js@3.5.0/dist/chatgpt.min.js#sha256-+C0x4BOFQc38aZB3pvUC2THu+ZSvuCxRphGdtRLjCDg=
// @require             https://cdn.jsdelivr.net/gh/adamlui/chatgpt-widescreen@b067617252caea259d42a17bd43a261ad34a94c6/chrome/extension/lib/dom.js#sha256-6ZG+oGJ+xnnXPZHwMwieBh778euTmyoJFX53D7d6QRc=
// @require             https://cdn.jsdelivr.net/gh/adamlui/chatgpt-widescreen@900bee420dc5c698f3befb811f9688bfe117d6d5/chrome/extension/lib/settings.js#sha256-dTGHlkJRGCGXIRYCT69tkYbU8SVp4dw5uuA1iYl7t6c=
// @require             https://cdn.jsdelivr.net/gh/adamlui/chatgpt-widescreen@8ba0d796f2602ec655d2e6e140f400df730acc8f/chrome/extension/components/buttons.js#sha256-CwmLdmwM/tqHbdrjFvIGiwziOBeEcJ+g0LeTKhaJGUQ=
// @require             https://cdn.jsdelivr.net/gh/adamlui/chatgpt-widescreen@2415cdcb1c607783e8e75c660979c283729f1ddc/chrome/extension/components/modals.js#sha256-6SkditdZTA8gtY35zcFgwdaQMoTlNjz9eN1mlFo0ZCY=
// @resource brsCSS     https://assets.aiwebextensions.com/styles/rising-stars/dist/black.min.css?v=0cde30f9ae3ce99ae998141f6e7a36de9b0cc2e7#sha256-4nbm81/JSas4wmxFIdliBBzoEEHRZ057TpzNX1PoQIs=
// @resource wrsCSS     https://assets.aiwebextensions.com/styles/rising-stars/dist/white.min.css?v=0cde30f9ae3ce99ae998141f6e7a36de9b0cc2e7#sha256-pW8xWWV6tm8Q6Ms+HWZv6+QzzTLJPyL1DyE18ywpVaE=
// @grant               GM_setValue
// @grant               GM_getValue
// @grant               GM_registerMenuCommand
// @grant               GM_unregisterMenuCommand
// @grant               GM_getResourceText
// @grant               GM_xmlhttpRequest
// @grant               GM.xmlHttpRequest
// @noframes
// @homepageURL         https://www.chatgptwidescreen.com
// @supportURL          https://support.chatgptwidescreen.com
// @contributionURL     https://github.com/sponsors/adamlui
// ==/UserScript==

// Documentation: https://docs.chatgptwidescreen.com
// NOTE: This script relies on the powerful chatgpt.js library @ https://chatgpt.js.org
//  © 2023–2025 KudoAI & contributors under the MIT license.

(async () => {

    // Init ENV context
    const env = {
        browser: {
            language: chatgpt.getUserLanguage(), isFF: chatgpt.browser.isFirefox(), isMobile: chatgpt.browser.isMobile()
        },
        scriptManager: {
            name: (() => { try { return GM_info.scriptHandler } catch (err) { return 'unknown' }})(),
            version: (() => { try { return GM_info.version } catch (err) { return 'unknown' }})()
        },
        site: /([^.]+)\.[^.]+$/.exec(location.hostname)[1], ui: {}
    }
    env.browser.isPortrait = env.browser.isMobile && (window.innerWidth < window.innerHeight)
    env.ui.scheme = getScheme()
    env.scriptManager.supportsTooltips = env.scriptManager.name == 'Tampermonkey'
                                      && parseInt(env.scriptManager.version.split('.')[0]) >= 5
    const xhr = typeof GM != 'undefined' && GM.xmlHttpRequest || GM_xmlhttpRequest

    // Init APP data
    const app = {
        version: GM_info.script.version, configKeyPrefix: `${env.site} Widescreen`,
        chatgptJSver: /chatgpt\.js@([\d.]+)/.exec(GM_info.scriptMetaStr)[1], urls: {},
        latestAssetCommitHash: '77e057e' // for cached app.json + sites.json + messages.json
    }
    app.urls.assetHost = `https://cdn.jsdelivr.net/gh/adamlui/chatgpt-widescreen@${app.latestAssetCommitHash}`
    const remoteAppData = await new Promise(resolve => xhr({
        method: 'GET', url: `${app.urls.assetHost}/data/app.json`,
        onload: resp => resolve(JSON.parse(resp.responseText))
    }))
    Object.assign(app, { ...remoteAppData, urls: { ...app.urls, ...remoteAppData.urls }})
    app.urls.update = app.urls.greasyFork.replace('https://', 'https://update.')
        .replace(/(\d+)-?([a-z-]*)$/i, (_, id, name) => `${id}/${ name || 'script' }.meta.js`)
    app.msgs = {
        appName: app.name,
        appAuthor: app.author.name,
        appDesc: 'Adds Widescreen + Fullscreen modes to ChatGPT for enhanced viewing + reduced scrolling',
        menuLabel_fullerWins: 'Fuller Windows',
        menuLabel_tallerChatbox: 'Taller Chatbox',
        menuLabel_widerChatbox: 'Wider Chatbox',
        menuLabel_newChatBtn: 'New Chat Button',
        menuLabel_hiddenHeader: 'Hidden Header',
        menuLabel_hiddenFooter: 'Hidden Footer',
        menuLabel_btnAnimations: 'Button Animations',
        menuLabel_modeNotifs: 'Mode Notifications',
        menuLabel_blockSpam: 'Spam Block',
        menuLabel_about: 'About',
        menuLabel_donate: 'Please send a donation',
        menuLabel_disabled: 'Disabled (extension installed)',
        about_author: 'Author',
        about_and: '&',
        about_contributors: 'contributors',
        about_version: 'Version',
        about_poweredBy: 'Powered by',
        about_openSourceCode: 'Open source code',
        mode_wideScreen: 'Wide screen',
        mode_fullWindow: 'Full-window',
        mode_fullScreen: 'Full screen',
        tooltip_wideScreenON: 'Wide screen',
        tooltip_wideScreenOFF: 'Exit wide screen',
        tooltip_fullWindowON: 'Full-window mode',
        tooltip_fullWindowOFF: 'Exit full window',
        tooltip_fullScreenON: 'Full screen',
        tooltip_fullScreenOFF: 'Exit full screen',
        tooltip_newChat: 'New chat',
        helptip_fullerWins: 'Also activate Wide Screen when activating Full-Window',
        helptip_tallerChatbox: 'Expand the chatbox vertically',
        helptip_widerChatbox: 'Expand the chatbox horizontally in Wide Screen mode',
        helptip_newChatBtn: 'Show New Chat button in chatbox',
        helptip_hiddenFooter: 'Hide site footer',
        helptip_hiddenHeader: 'Hide site header',
        helptip_btnAnimations: 'Animate chatbar buttons on hover',
        helptip_modeNotifs: 'Show notifications when toggling modes/settings',
        helptip_blockSpam: 'Hide spam banners from cluttering the page',
        alert_choosePlatform: 'Choose a platform',
        alert_updateAvail: 'Update available',
        alert_newerVer: 'An update to',
        alert_isAvail: 'is available',
        alert_upToDate: 'Up-to-date',
        alert_isUpToDate: 'is up-to-date',
        alert_showYourSupport: 'Show your support',
        alert_isOSS: 'is open-source software built & maintained for free through 100% volunteer efforts',
        alert_despiteAffliction: 'Despite being severely afflicted by',
        alert_longCOVID: 'long COVID',
        alert_since2020: 'since 2020',
        alert_byDonatingResults: 'by donating, you help me to continue improving, fixing bugs, adding new features, and making the software even better',
        alert_yourContrib: 'Your contribution',
        alert_noMatterSize: 'no matter the size',
        alert_directlySupports: 'directly supports my unpaid efforts to ensure this project remains free and open for all to use',
        alert_tyForSupport: 'Thank you for your support',
        alert_pressF11: 'Press F11 to exit full screen',
        alert_f11reason: 'F11 was used to enter full screen, and due to browser security reasons, the same key must be used to exit it',
        btnLabel_moreAIextensions: 'More AI Extensions',
        btnLabel_rateUs: 'Rate Us',
        btnLabel_getSupport: 'Get Support',
        btnLabel_checkForUpdates: 'Check for Updates',
        btnLabel_update: 'Update',
        btnLabel_dismiss: 'Dismiss',
        link_viewChanges: 'View changes',
        state_on: 'on',
        state_off: 'off'
    }

    // LOCALIZE app.msgs for non-English users
    if (!env.browser.language.startsWith('en')) {
        const localizedMsgs = await new Promise(resolve => {
            const msgHostDir = app.urls.assetHost + '/chrome/extension/_locales/',
                  msgLocaleDir = ( env.browser.language ? env.browser.language.replace('-', '_') : 'en' ) + '/'
            let msgHref = msgHostDir + msgLocaleDir + 'messages.json', msgXHRtries = 0
            function fetchMsgs() { xhr({ method: 'GET', url: msgHref, onload: handleMsgs })}
            function handleMsgs(resp) {
                try { // to return localized messages.json
                    const msgs = JSON.parse(resp.responseText), flatMsgs = {}
                    for (const key in msgs) // remove need to ref nested keys
                        if (typeof msgs[key] == 'object' && 'message' in msgs[key])
                            flatMsgs[key] = msgs[key].message
                    resolve(flatMsgs)
                } catch (err) { // if bad response
                    msgXHRtries++ ; if (msgXHRtries == 3) return resolve({}) // try original/region-stripped/EN only
                    msgHref = env.browser.language.includes('-') && msgXHRtries == 1 ? // if regional lang on 1st try...
                        msgHref.replace(/([^_]+_[^_]+)_[^/]*(\/.*)/, '$1$2') // ...strip region before retrying
                            : ( msgHostDir + 'en/messages.json' ) // else use default English messages
                    fetchMsgs()
                }
            }
            fetchMsgs()
        })
        Object.assign(app.msgs, localizedMsgs)
    }

    // Init SITE profiles
    const sites = Object.assign(Object.create(null), await new Promise(resolve => xhr({
        method: 'GET', url: `${app.urls.assetHost}/data/sites.json`,
        onload: resp => resolve(JSON.parse(resp.responseText))
    })))
    sites.openai = { ...sites.chatgpt } // shallow copy to cover old domain

    // Export DEPENDENCIES to imported resources
    dom.imports.import({ env }) // for env.ui.scheme
    modals.imports.import({ app, env, updateCheck }) // for app data + env.ui.scheme + modals.about
    settings.imports.import({ app }) // for app.msgs + app.configKeyPrefix refs

    // Init SETTINGS
    settings.load(sites[env.site].availFeatures)

    // Define FUNCTIONS

    const menu = {
        ids: [], state: {
            symbols: ['❌', '✔️'], separator: env.scriptManager.name == 'Tampermonkey' ? ' — ' : ': ',
            words: [app.msgs.state_off.toUpperCase(), app.msgs.state_on.toUpperCase()]
        },

        register() {

            // Show "Disabled (extension installed)"
            if (env.extensionInstalled)
                GM_registerMenuCommand(`${menu.state.symbols[0]} ${app.msgs.menuLabel_disabled}`,
                    () => modals.open('about'), env.scriptManager.supportsTooltips ? { title: ' ' } : undefined )

            // ...or add settings toggles
            else Object.keys(settings.controls).forEach(key => {
                if (sites[env.site].availFeatures.includes(key)) {
                    const settingIsEnabled = config[key] ^ key.includes('Disabled')
                    const menuLabel = `${ settings.controls[key].symbol || menu.state.symbols[+settingIsEnabled] } `
                                    + settings.controls[key].label
                                    + menu.state.separator + menu.state.words[+settingIsEnabled]
                    menu.ids.push(GM_registerMenuCommand(menuLabel, () => {
                        settings.save(key, !config[key]) ; sync.configToUI({ updatedKey: key })
                        notify(`${settings.controls[key].label}: ${
                            menu.state.words[+(key.includes('Disabled') ^ config[key])]}`)
                    }, env.scriptManager.supportsTooltips ? { title: settings.controls[key].helptip || ' ' } : undefined))
                }
            });

            // Add About/Donate entries
            ['about', 'donate'].forEach(entryType => {
                if (entryType === 'donate' && env.extensionInstalled) return
                menu.ids.push(GM_registerMenuCommand(
                    `${ entryType == 'about' ? '💡' : '💖' }`
                        + ` ${app.msgs[`menuLabel_${entryType}`]} ${ entryType == 'about' ? app.msgs.appName : '' }`,
                    () => modals.open(entryType), env.scriptManager.supportsTooltips ? { title: ' ' } : undefined
                ))
            })
        },

        refresh() {
            if (typeof GM_unregisterMenuCommand == 'undefined') return
            for (const id of menu.ids) { GM_unregisterMenuCommand(id) } menu.register()
        }
    }

    function updateCheck() {
        xhr({
            method: 'GET', url: app.urls.update + '?t=' + Date.now(),
            headers: { 'Cache-Control': 'no-cache' },
            onload: resp => {

                // Compare versions, alert if update found
                app.latestVer = /@version +(.*)/.exec(resp.responseText)[1]
                for (let i = 0 ; i < 4 ; i++) { // loop thru subver's
                    const currentSubVer = parseInt(app.version.split('.')[i], 10) || 0,
                          latestSubVer = parseInt(app.latestVer.split('.')[i], 10) || 0
                    if (currentSubVer > latestSubVer) break // out of comparison since not outdated
                    else if (latestSubVer > currentSubVer) // if outdated
                        return modals.open('update', 'available')
                }

                // Alert to no update found, nav back to About
                modals.open('update', 'unavailable')
        }})
    }

    function notify(msg, pos = '', notifDuration = '', shadow = '') {
        if (config.notifDisabled && !msg.includes(app.msgs.menuLabel_modeNotifs)) return

        // Strip state word to append colored one later
        const foundState = menu.state.words.find(word => msg.includes(word))
        if (foundState) msg = msg.replace(foundState, '')

        // Show notification
        chatgpt.notify(`${app.symbol} ${msg}`, pos, notifDuration, shadow || env.ui.scheme == 'dark' ? '' : 'shadow')
        const notif = document.querySelector('.chatgpt-notif:last-child')

        // Append styled state word
        if (foundState) {
            const styledStateSpan = dom.create.elem('span')
            styledStateSpan.style.cssText = `color: ${
                foundState == menu.state.words[0] ? '#ef4848 ; text-shadow: rgba(255,169,225,0.44) 2px 1px 5px'
                                                  : '#5cef48 ; text-shadow: rgba(255,250,169,0.38) 2px 1px 5px' }`
            styledStateSpan.append(foundState) ; notif.append(styledStateSpan)
        }
    }

    const chatbar = {

        get() {
            let chatbar = document.querySelector(sites[env.site].selectors.input)
            const lvlsToParent = /chatgpt|openai/.test(env.site) ? 3 : 2
            for (let i = 0 ; i < lvlsToParent ; i++) chatbar = chatbar?.parentNode
            return chatbar
        },

        tweak() {
            if (!/chatgpt|openai/.test(env.site)) return
            const chatbarDiv = chatbar.get() ; if (!chatbarDiv) return
            const inputArea = chatbarDiv.querySelector(sites[env.site].selectors.input) ; if (!inputArea) return
            if (chatgpt.canvasIsOpen()) inputArea.parentNode.style.width = '100%'
            else if (!env.tallChatbar) { // narrow it to not clash w/ buttons
                const widths = { chatbar: chatbarDiv.getBoundingClientRect().width }
                const visibleBtnTypes = [...buttons.getTypes.visible(), 'send']
                visibleBtnTypes.forEach(type =>
                    widths[type] = buttons[type]?.getBoundingClientRect().width
                            || document.querySelector(`${sites[env.site].selectors.btns.send}, ${
                                sites[env.site].selectors.btns.stop}`)?.getBoundingClientRect().width || 0 )
                    const totalBtnWidths = visibleBtnTypes.reduce((sum, btnType) => sum + widths[btnType], 0)
                inputArea.parentNode.style.width = `${ // expand to close gap w/ buttons
                    widths.chatbar - totalBtnWidths -( env.browser.isFF ? 60 : 43 )}px`
                inputArea.style.width = '100%' // rid h-scrollbar
            }
        }
    }

    const toggle = {

        mode(mode, state = '') {
            switch (state.toUpperCase()) {
                case 'ON' : activateMode(mode) ; break
                case 'OFF' : deactivateMode(mode) ; break
                default : ( mode == 'wideScreen' ? document.head.contains(wideScreenStyle)
                          : mode == 'fullWindow' ? isFullWin() : chatgpt.isFullScreen() ) ? deactivateMode(mode)
                                                                                          : activateMode(mode)
            }

            function activateMode(mode) {
                if (mode == 'wideScreen') { document.head.append(wideScreenStyle) ; sync.mode('wideScreen') }
                else if (mode == 'fullWindow') {
                    const sidebarToggle = document.querySelector(sites[env.site].selectors.btns.sidebarToggle)
                    if (sidebarToggle) sidebarToggle.click()
                    else { document.head.append(fullWinStyle) ; sync.mode('fullWindow') }
                } else if (mode == 'fullScreen') document.documentElement.requestFullscreen()
            }

            function deactivateMode(mode) {
                if (mode == 'wideScreen') {
                    wideScreenStyle.remove() ; sync.mode('wideScreen')
                } else if (mode == 'fullWindow') {
                    const sidebarToggle = document.querySelector(sites[env.site].selectors.btns.sidebarToggle)
                    if (sidebarToggle) sidebarToggle.click()
                    else { fullWinStyle.remove() ; sync.mode('fullWindow') }
                } else if (mode == 'fullScreen') {
                    if (config.f11) modals.alert(app.msgs.alert_pressF11, `${app.msgs.alert_f11reason}.`)
                    else document.exitFullscreen().catch(
                        err => console.error(app.symbol + ' » Failed to exit fullscreen', err))
                }
            }
        },

        tooltip(event) {
            update.tooltip(event.currentTarget.id.replace(/-btn$/, ''))
            tooltipDiv.style.opacity = event.type == 'mouseover' ? 1 : 0
        }
    }

    // Export dependencies to BUTTONS
    const tooltipDiv = dom.create.elem('div', { class: 'cwm-tooltip' }),
          tweaksStyle = dom.create.style()
    buttons.imports.import({ app, chatbar, env, sites, toggle, tooltipDiv, tweaksStyle })

    const update = {

        style: {

            chatbar() {
                chatbarStyle.innerText = (
                    /chatgpt|openai/.test(env.site) ? ( config.widerChatbox ? ''
                        : `main form { max-width: ${chatbar.nativeWidth}px !important ; margin: auto }` )
                  : env.site == 'poe' ? ( config.widerChatbox && config.wideScreen ?
                        '[class^=ChatPageMainFooter_footerInner] { width: 98% ; margin-right: 15px }' : '' )
                  : '' )
            },

            tweaks() {
                tweaksStyle.innerText = (
                    ( /chatgpt|openai/.test(env.site) ? (
                            '[id$=-btn]:hover { opacity: 100% !important }' // prevent chatbar btn dim on hover
                          + 'main { overflow: clip !important }' // prevent h-scrollbar...
                                // ...on sync.mode('fullWindow) => delayed chatbar.tweak()
                          + ( config.blockSpamDisabled ? '' : // hide Get Plus spam banner
                                ( '[class^="@lg/thread"]:has(button[data-testid=close-button]),' // logged-in
                                + '[class*=bottom]:has(button[data-testid=close-button]) { display: none }' )) // logged-out
                    ) : env.site == 'perplexity' ? (
                            ( config.blockSpamDisabled ? '' : // hide homepage spam banners
                                'div.absolute.w-full:has(svg[data-icon=xmark]) { display: none }' )
                          + `.${buttons.class} { transition: none }` // prevent chatbar btn animation on hover-off
                    ) : '' )
                  + ( config.tcbDisabled == false ? tcbStyle : '' ) // expand text input vertically
                  + ( config.hiddenHeader ? hhStyle : '' ) // hide header
                  + ( config.hiddenFooter ? hfStyle : '' ) // hide footer
                  + `#newChat-btn { display: ${ config.ncbDisabled == true ? 'none' : 'flex' }}`
                  + ( config.btnAnimationsDisabled ? '' : // zoom chatbar buttons on hover
                        `.${buttons.class}:hover { transform: scale(${ env.site == 'poe' ? 1.15 : 1.285}) }` )
                )
            },

            wideScreen() {
                wideScreenStyle.innerText = (
                    /chatgpt|openai/.test(env.site) ? (
                        '.text-base { max-width: 100% !important }' // widen outer container
                      + ( !env.tallChatbar ? '.text-base:nth-of-type(2) { max-width: 97% !important }' : '' )
                  ) : env.site == 'perplexity' ? (
                        `${sites.perplexity.selectors.header} ~ div,` // outer container
                      + `${sites.perplexity.selectors.header} ~ div > div` // inner container
                          + '{ max-width: 100% }' // ...widen them
                      + '.col-span-8 { width: 154% }' // widen inner-left container
                      + '.col-span-4 { width: 13.5% ; position: absolute ; right: 0 }' // narrow right-bar
                  ) : env.site == 'poe' ? (
                        '[class*=ChatMessagesView] { width: 100% !important }' // widen outer container
                      + '[class^=Message] { max-width: 100% !important }' ) // widen speech bubbles
                  : '' )
            }
        },

        tooltip(btnType) { // text & position
            const visibleBtnTypes = buttons.getTypes.visible()
            const ctrAddend = ( env.site == 'perplexity' ? ( location.pathname == '/' ? 94 : 105 )
                              : env.site == 'poe' ? 35 : 13 ) +25
            const spreadFactor = env.site == 'perplexity' ? 26.5 : env.site == 'poe' ? 28 : 30.55
            const iniRoffset = spreadFactor * ( visibleBtnTypes.indexOf(btnType) +1 ) + ctrAddend
                             + ( env.tallChatbar ? -2 : 4 )
            tooltipDiv.innerText = app.msgs['tooltip_' + btnType + (
                !/full|wide/i.test(btnType) ? '' : (config[btnType] ? 'OFF' : 'ON'))]
            tooltipDiv.style.right = `${ // x-pos
                iniRoffset - tooltipDiv.getBoundingClientRect().width /2 }px`
            tooltipDiv.style.bottom = ( // y-pos
                env.site == 'perplexity' ? (
                    location.pathname != '/' ? '64px' : ( // not homepage
                        isFullWin() ? '58px' // full-window homepage
                      : document.querySelector(sites.perplexity.selectors.btns.settings) ? 'revert-layer' // logged-in homepage
                      : '50.5vh' // logged-out homepage
                    )
                ) : '50px' // non-Perplexity sites
            )
        }
    }

    const sync = {

        fullerWin() {
            if (config.fullWindow && config.fullerWindows && !config.wideScreen) { // activate fuller windows
                document.head.append(wideScreenStyle) ; buttons.update.svg('wideScreen', 'on')
            } else if (!config.fullWindow) { // de-activate fuller windows
                fullWinStyle.remove() // to remove style too so sidebar shows
                if (!config.wideScreen) { // disable widescreen if result of fuller window
                    wideScreenStyle.remove() ; buttons.update.svg('wideScreen', 'off')
            }}
        },

        mode(mode) { // setting + icon + tooltip + chatbar
            const state = ( mode == 'wideScreen' ? !!document.getElementById('wideScreen-mode')
                          : mode == 'fullWindow' ? isFullWin()
                                                 : chatgpt.isFullScreen() )
            settings.save(mode, state) ; buttons.update.svg(mode) ; update.tooltip(mode)
            if (mode == 'fullWindow') sync.fullerWin()
            if (/chatgpt|openai/.test(env.site)) setTimeout(() => chatbar.tweak(), // update inner width
                mode == 'fullWindow' && ( config.wideScreen || config.fullerWindows )
                    && config.widerChatbox ? 111 : 0) // delay if toggled to/from active WCB to avoid wrong width
            else if (env.site == 'poe' && config.widerChatbox) update.style.chatbar() // sync WCB
            notify(`${app.msgs[`mode_${mode}`]} ${app.msgs[`state_${ state ? 'on' : 'off' }`].toUpperCase()}`)
            config.modeSynced = true ; setTimeout(() => config.modeSynced = false, 100) // prevent repetition
        },

        configToUI(options) { // from toolbar menu toggles
            if (sites[env.site].hasSidebar) sync.fullerWin() // sync FW
            update.style.tweaks() // sync TCB/NCB/HH/HF/BA
            update.style.chatbar() // sync WCB
            chatbar.tweak() // update chatgpt.com chatbar inner width
            menu.refresh() // to update state symbol/suffix
            if (options?.updatedKey == 'btnAnimationsDisabled' && !config.btnAnimationsDisabled) // apply/remove fx
                // ...to visually signal location + preview fx applied by Button Animations toggle-on
                buttons.animate()
        }
    }

    function getScheme() {
        const rootElem = document.documentElement
        return env.site == 'perplexity' ? rootElem.dataset.colorScheme : rootElem.className
            || (window.matchMedia?.('(prefers-color-scheme: dark)')?.matches ? 'dark' : 'light')
    }

    function isFullWin() {
        return env.site == 'poe' ? !!document.getElementById('fullWindow-mode')
            : !sites[env.site].hasSidebar // false if sidebar non-existent
           || /\d+/.exec(getComputedStyle(document.querySelector(
                  sites[env.site].selectors.sidebar))?.width || '')[0] < 100
    }

    chatgpt.canvasIsOpen = function() {
        return document.querySelector('section.popover')?.getBoundingClientRect().top == 0 }

    // Run MAIN routine

    // Create browser TOOLBAR MENU or DISABLE SCRIPT if extension installed
    env.extensionInstalled = await Promise.race([
        new Promise(resolve => {
            (function checkExtensionInstalled() {
                if (document.documentElement.hasAttribute('chatgpt-widescreen-extension-installed')) resolve(true)
                else setTimeout(checkExtensionInstalled, 200)
            })()
        }), new Promise(resolve => setTimeout(() => resolve(false), 1500))])

    menu.register() ; if (env.extensionInstalled) return

    // Init UI props
    if (/chatgpt|openai/.test(env.site)) {
        sites[env.site].hasSidebar = !!await Promise.race([
            dom.getLoadedElem(sites.chatgpt.selectors.btns.sidebarToggle), // DOM element if sidebar toggle loads
            dom.getLoadedElem(sites.chatgpt.selectors.btns.login).then(() => false), // null if login button loads
            new Promise(resolve => setTimeout(() => resolve(null), 3000)) // null if 3s passed
        ])
    }

    // Init FULL-MODE states
    config.fullScreen = chatgpt.isFullScreen()
    if (sites[env.site].selectors.btns.sidebarToggle) // site has native FW state
         config.fullWindow = isFullWin() // ...so match it
    else settings.load('fullWindow') // otherwise load CWM's saved state

    // Stylize ALERTS
    if (!document.getElementById('chatgpt-alert-override-style')) {
        const chatgptAlertStyle = dom.create.style()
        chatgptAlertStyle.id = 'chatgpt-alert-override-style'
        chatgptAlertStyle.innerText = (
            ( env.ui.scheme == 'dark' ? '.chatgpt-modal > div { border: 1px solid white }' : '' )
        )
        document.head.append(chatgptAlertStyle)
    }

    // Stylize TOOLTIP div
    document.head.append(dom.create.style('.cwm-tooltip {'
        + 'background-color: rgba(0,0,0,0.71) ; padding: 5px 6px ; border-radius: 6px ; border: 1px solid #d9d9e3 ;'
        + 'font-size: 0.85rem ; color: white ;' // font style
        + 'box-shadow: 4px 6px 16px 0 rgb(0 0 0 / 38%) ;' // drop shadow
        + 'position: absolute ; bottom: 58px ; opacity: 0 ; z-index: 9999 ;' // visibility
        + 'transition: opacity 0.1s ; -webkit-transition: opacity 0.1s ; -moz-transition: opacity 0.1s ;'
            + '-ms-transition: opacity 0.1s ; -o-transition: opacity 0.1s ;'
        + 'user-select: none ; webkit-user-select: none ; -moz-user-select: none ; -ms-user-select: none }'
    ))

    // Apply general style TWEAKS
    const tcbStyle = ( // heighten chatbox
              /chatgpt|openai/.test(env.site) ? `div[class*=prose]:has(${sites[env.site].selectors.input})`
                                              : sites[env.site].selectors.input )
                   + '{ max-height: 68vh }'
    const hhStyle = sites[env.site].selectors.header + '{ display: none !important }' // hide header
                  + ( /chatgpt|openai/.test(env.site) ? 'main { padding-top: 12px }' : '' ) // increase top-padding
    const hfStyle = sites[env.site].selectors.footer + '{ display: none }' // hide footer

    update.style.tweaks() ; document.head.append(tweaksStyle);

    // Add STARS styles
    ['brs', 'wrs'].forEach(cssType => document.head.append(dom.create.style(GM_getResourceText(`${cssType}CSS`))))

    // Create WIDESCREEN style
    const wideScreenStyle = dom.create.style()
    wideScreenStyle.id = 'wideScreen-mode' // for sync.mode()
    if (!chatbar.get()) await dom.getLoadedElem(sites[env.site].selectors.input)
    if (/chatgpt|openai/.test(env.site)) // store native chatbar width for Wider Chatbox style
        chatbar.nativeWidth = /\d+/.exec(getComputedStyle(document.querySelector('main form')).width)[0]
    update.style.wideScreen()

    // Create FULL-WINDOW style
    const fullWinStyle = dom.create.style()
    fullWinStyle.id = 'fullWindow-mode' // for sync.mode()
    fullWinStyle.innerText = sites[env.site].selectors.sidebar + '{ display: none }'

    // Create/append CHATBAR style
    const chatbarStyle = dom.create.style()
    update.style.chatbar() ; document.head.append(chatbarStyle)

    // Insert BUTTONS
    buttons.insert()

    // Restore PREV SESSION's state
    if (config.wideScreen) toggle.mode('wideScreen', 'ON')
    if (config.fullWindow && sites[env.site].hasSidebar) {
        if (sites[env.site].selectors.btns.sidebarToggle) // site has own FW config
             sync.mode('fullWindow') // ...so sync w/ it
        else toggle.mode('fullWindow', 'on') // otherwise self-toggle
    }

    // Monitor NODE CHANGES to maintain button visibility + update colors
    let isTempChat = false, canvasWasOpen = chatgpt.canvasIsOpen()
    new MutationObserver(() => {

        // Maintain button visibility on nav
        if (!document.getElementById('fullScreen-btn') && chatbar.get() && buttons.state.status != 'inserting') {
            buttons.state.status = 'missing' ; buttons.insert() }

        // Maintain button colors + Widescreen button visibility on snowflake chatgpt.com
        if (/chatgpt|openai/.test(env.site)) {

            // Update button colors on temp chat toggle
            const chatbarIsBlack = !!document.querySelector('div[class*=bg-black]:not([id$=-btn])')
            if (chatbarIsBlack != isTempChat) { buttons.update.color() ; isTempChat = chatbarIsBlack }

            // Add/remove Widescreen button on Canvas mode toggle
            if (canvasWasOpen ^ chatgpt.canvasIsOpen()) {
                buttons.remove() ; buttons.create() // again for new h-offsets
                buttons.insert() ; chatbar.tweak() ; canvasWasOpen = !canvasWasOpen
            }
        }
    }).observe(document[env.site == 'poe' ? 'head' : 'body'], { attributes: true, subtree: true })

    // Monitor SCHEME PREF changes to update sidebar toggle + modal colors
    new MutationObserver(handleSchemePrefChange).observe( // for site scheme pref changes
        document.documentElement, { attributes: true, attributeFilter: ['class', 'data-color-scheme'] })
    window.matchMedia('(prefers-color-scheme: dark)').addEventListener( // for browser/system scheme pref changes
        'change', () => requestAnimationFrame(handleSchemePrefChange))
    function handleSchemePrefChange() {
        const displayedScheme = getScheme()
        if (env.ui.scheme != displayedScheme) {
            env.ui.scheme = displayedScheme ; modals.stylize() ; buttons.update.color() }
    }

    // Monitor SIDEBAR to update full-window setting
    if (sites[env.site].selectors.btns.sidebarToggle && sites[env.site].hasSidebar) {
        const sidebarObserver = new MutationObserver(async () => {
            await new Promise(resolve => setTimeout(resolve, env.site == 'perplexity' ? 500 : 0))
            if ((config.fullWindow ^ isFullWin()) && !config.modeSynced) sync.mode('fullWindow')
        })
        setTimeout(() => { // delay half-sec before observing to avoid repeated toggles from node observer
            let obsTarget = document.querySelector(sites[env.site].selectors.sidebar)
            if (env.site == 'perplexity') obsTarget = obsTarget.parentNode
            sidebarObserver.observe(obsTarget, { attributes: true })
        }, 500)
    }

    // Add RESIZE LISTENER to update full screen setting/button + disable F11 flag
    window.addEventListener('resize', () => {
        const fullScreenState = chatgpt.isFullScreen()
        if (config.fullScreen && !fullScreenState) { // exiting full screen
            sync.mode('fullScreen') ; config.f11 = false }
        else if (!config.fullScreen && fullScreenState) // entering full screen
            sync.mode('fullScreen')
        if (/chatgpt|openai/.test(env.site)) chatbar.tweak() // update ChatGPT chatbar inner width
    })

    // Add KEY LISTENER to enable flag on F11 + stop generating text on ESC
    document.addEventListener('keydown', event => {
        if ((event.key == 'F11' || event.keyCode == 122) && !config.fullScreen) config.f11 = true
        else if ((event.key.startsWith('Esc') || event.keyCode == 27) && !chatgpt.isIdle()) chatgpt.stop()
    })

})()