// ==UserScript==
// @name ChatGPT Auto Refresh ↻
// @name:af ChatGPT Auto Verfris ↻
// @name:am የአቃጥል GPT ራስሀሽ ↻
// @name:ar ChatGPT تحديث تلقائي ↻
// @name:az ChatGPT Avtomatik Yenilə ↻
// @name:be Аўтаматычнае абнаўленне ChatGPT ↻
// @name:bem ChatGPT Auto Sintalula ↻
// @name:bg Автоматично опресняване на ChatGPT ↻
// @name:bn ChatGPT স্বয়ংক্রিয় রিফ্রেশ ↻
// @name:bo ChatGPT རེའུ་མིན་པར་སྣོད་དང་ ↻
// @name:bs ChatGPT Automatsko Osvježavanje ↻
// @name:ca ChatGPT Actualització Automàtica ↻
// @name:ckb ChatGPT نوێکردنهوهی خۆکار ↻
// @name:cs ChatGPT Automatické obnovení ↻
// @name:cy ChatGPT Adnewyddu Auto ↻
// @name:da ChatGPT Automatisk Opdatering ↻
// @name:de ChatGPT Automatisches Aktualisieren ↻
// @name:dv ChatGPT އައްޗައިސް އަސްޓްރީ ↻
// @name:dz ChatGPT རེའུ་མིན་པར་སྣོད་དང་ ↻
// @name:el ChatGPT Αυτόματη Ανανέωση ↻
// @name:eo ChatGPT Aŭtomata Refreŝigo ↻
// @name:es ChatGPT Actualización Automática ↻
// @name:et ChatGPT Automaatne Värskendamine ↻
// @name:eu ChatGPT Automatikoki Freskatu ↻
// @name:fa به روز رسانی خودکار ChatGPT ↻
// @name:fi ChatGPT Automaattinen Päivitys ↻
// @name:fo ChatGPT Auto Uppdatering ↻
// @name:fr ChatGPT Actualisation Automatique ↻
// @name:fr-CA ChatGPT Actualisation Automatique ↻
// @name:gd ChatGPT Ath-bhualadh Aonaranach ↻
// @name:gl ChatGPT Actualización Automática ↻
// @name:gu ChatGPT સ્વચાલિત રિફ્રેશ ↻
// @name:haw Hoʻonoho Hōʻike Auto ChatGPT ↻
// @name:he רענון אוטומטי של ChatGPT ↻
// @name:hi ChatGPT स्वचालित रीफ़्रेश ↻
// @name:hr ChatGPT Automatsko Osvježavanje ↻
// @name:ht ChatGPT Rafrechi Otomatik ↻
// @name:hu ChatGPT Automatikus Frissítés ↻
// @name:hy Ինքնաշխատ Թարմացում ChatGPT ↻
// @name:id ChatGPT Pembaruan Otomatis ↻
// @name:is ChatGPT Sjálfvirk Endurnýjun ↻
// @name:it ChatGPT Aggiornamento Automatico ↻
// @name:ja ChatGPT 自動更新 ↻
// @name:jv Pembaruan Otomatis ChatGPT ↻
// @name:ka ChatGPT ავტომატური განახლება ↻
// @name:kab ChatGPT Akarẓim Aɣelnaw ↻
// @name:kk ChatGPT Автоматты Жаңарту ↻
// @name:km ChatGPT បន្ទាប់ពីបច្ចុប្បន្នភាព ↻
// @name:kn ChatGPT ಸ್ವಯಂಚಾಲಿತ ರಿಫ್ರೆಶ್ ↻
// @name:ko ChatGPT 자동 새로 고침 ↻
// @name:ky ChatGPT Автоматтык Тазартуу ↻
// @name:la ChatGPT Automatica Refectio ↻
// @name:lb ChatGPT Automatescht Aktualiséieren ↻
// @name:lo ChatGPT ປັບປຸງອັດຕະໂນມັດອັດຕະໂນມັດ ChatGPT ↻
// @name:lt ChatGPT Automatinis Atnaujinimas ↻
// @name:lv ChatGPT Automātiska Atsvaidzināšana ↻
// @name:mg Fanavaozana Ankehitriny i ChatGPT ↻
// @name:mi ChatGPT Whakahōu Aunoa ↻
// @name:mk Автоматско освежување ChatGPT ↻
// @name:ml ChatGPT ഓട്ടോ അപ്ഡേറ്റ് ↻
// @name:mn ChatGPT Автоматаар Шинэчлэх ↻
// @name:ms Penyegaran Auto ChatGPT ↻
// @name:mt ChatGPT Rifreżġjar Awtomatiku ↻
// @name:my ChatGPT အလိုအလျောက်ထပ်ဖြန် ↻
// @name:ne ChatGPT आफ्नैजस्तै ताजा गर्नुहोस् ↻
// @name:nl ChatGPT Automatische Vernieuwing ↻
// @name:no ChatGPT Automatisk Oppdatering ↻
// @name:pa ChatGPT ਆਟੋ ਰਿਫਰੈਸ਼ ↻
// @name:pap ChatGPT Refreskamentu Automatico ↻
// @name:pl ChatGPT Automatyczne Odświeżanie ↻
// @name:ps د ChatGPT زما تازه کول ↻
// @name:pt ChatGPT Atualização Automática ↻
// @name:pt-BR ChatGPT Atualização Automática ↻
// @name:rn ChatGPT Gushira Ubushyuhe ↻
// @name:ro ChatGPT Reîmprospătare Automată ↻
// @name:ru Автообновление ChatGPT ↻
// @name:sg ChatGPT Rafraîchissement Auto ↻
// @name:si ChatGPT ස්වයංක්රීය නැවතුම් ↻
// @name:sk ChatGPT Automatické Obnovenie ↻
// @name:sl ChatGPT Samodejna Osvežitev ↻
// @name:sm ChatGPT Toeaina Auto Taulagaina ↻
// @name:sn ChatGPT Rurefu Rakaita Zvakanaka ↻
// @name:so ChatGPT Dib-u-helayna Xafiiska ↻
// @name:sr ChatGPT Аутоматско Освежавање ↻
// @name:sv ChatGPT Automatisk Uppdatering ↻
// @name:sw ChatGPT Kupakia Moja kwa moja ↻
// @name:ta ChatGPT தானியங்கி புதுப்பிப்பு ↻
// @name:te ChatGPT ఆటో రిఫ్రెష్ ↻
// @name:tg ChatGPT Таҷдиди худкори ChatGPT ↻
// @name:th ChatGPT รีเฟรชอัตโนมัติ ↻
// @name:ti ChatGPT ኣካውንታት እውነት ዓይኒ ↻
// @name:tk ChatGPT Awtomatik Täzele ↻
// @name:tn ChatGPT Tlhokomelo ya Moafrika ↻
// @name:to ChatGPT Fakahā ʻihaotaha ↻
// @name:tpi ChatGPT Awto Rifrehs ↻
// @name:tr ChatGPT Otomatik Yenileme ↻
// @name:uk Автоматичне Оновлення ChatGPT ↻
// @name:ur خودکار تازہ کاری ChatGPT ↻
// @name:uz ChatGPT Avtomatik Yangilash ↻
// @name:vi ChatGPT Tự động Cập nhật ↻
// @name:xh ChatGPT Ukunovusa Okuvela ↻
// @name:yi ChatGPT אַטאַ אַקטואַליזירן ↻
// @name:zh ChatGPT 自动刷新 ↻
// @name:zh-CN ChatGPT 自动刷新 ↻
// @name:zh-HK ChatGPT 自動刷新 ↻
// @name:zh-SG ChatGPT 自动刷新 ↻
// @name:zh-TW ChatGPT 自動刷新 ↻
// @name:zu ChatGPT Ukusasaza Ngokuzenzakalelayo ↻
// @description *SAFELY* eliminate 10-minute chat resets + constant network errors + Cloudflare checks from ChatGPT
// @description:af *VEILIG* elimineer 10-minuut klets herstelling + aanhoudende netwerkfoute + Cloudflare-kontroles uit ChatGPT.
// @description:am *ባርማ* ከChatGPT ውስጥ የ10 ደቂቃ መካከለኛ ገጽታ መድረስን፣ *በጭራቅ የሚከሰቱ አውታረ መረብ ስህተቶችን*እና ክላይንት ፓስያንት ምርመራዎችን ይወግዱ።
// @description:ar *بأمان* احذف إعادة تعيين الدردشة لمدة 10 دقائق + *أخطاء الشبكة المستمرة* + فحوصات Cloudflare من ChatGPT.
// @description:az *TƏHLÜKƏSİZ* 10 dəqiqəlik söhbət sıfırlamalarını, *davamlı şəbəkə xətalarını* və Cloudflare yoxlamalarını ChatGPT'dən çıxarın.
// @description:be *БЯСПЕКА* выдаліце 10-хвілінныя перазагрузкі чата, *пастаянныя сеткавыя памылкі* і праверкі Cloudflare са ChatGPT.
// @description:bem *UMULI* fyumbafye amafuula ya menso 10 + *aya makota yambi konse konse* nefimfi ifyakwa pantu + ifiletelwe ifyakwa Cloudflare ukufuma mu ChatGPT.
// @description:bg *БЕЗОПАСНО* премахнете 10-минутни нулирания на чата, *постоянни мрежови грешки* и проверки на Cloudflare от ChatGPT.
// @description:bn ChatGPT-এর থেকে ১০ মিনিটের চ্যাট রিসেট, *চিরস্থায়ী নেটওয়ার্ক ত্রুটি* এবং ক্লাউডফ্লেয়ার যাচাই-বাছাই সরিয়ে দিন *নিরাপদে*।
// @description:bo *རྒྱབ་བཞིན་པའི་* ཟའ་གྲགས་10 སྐར་མ་གཞན་འགྱུར་འདོན་སྐབས་མེད་པ། *ངོས་འཛིན་ཡོད་པ་* Cloudflare་དྲི་ཞིམ་བཟོ་བའི་ཕྱིར་ ChatGPT་ནས་ཕྱི་ལོག །
// @description:bs *SIGURNO* uklonite 10-minutna resetovanja četa, *konstantne greške mreže* i Cloudflare provjere iz ChatGPT.
// @description:ca *SEGUR* elimineu els reajustaments de xat de 10 minuts + *errors de xarxa constants* i comprovacions de Cloudflare de ChatGPT.
// @description:ceb *LUWAS* hika ang mga pag-reset sa pag-chat sa 10 ka minuto + *walay hunong nga mga sayop sa network* + mga pagsusi sa Cloudflare gikan sa ChatGPT.
// @description:ckb *بەبێ پەیمانە* پشوودانی سنووری چاتی ١٠ خولەکی، *کێشەی شبکەیی ڕاستەوخۆ* و بڵاودەکردنەوەکانی Cloudflare لە ChatGPT دابڕۆ.
// @description:cs *BEZPEČNĚ* odstraňte 10minutová obnovení chatu, *trvalé síťové chyby* a kontroly Cloudflare z ChatGPT.
// @description:cy *YN DIOGEL* cael gwared â 10 munud ailosod sgwrs + *gwallau rhwydwaith parhaus* + gwiriadau Cloudflare o ChatGPT.
// @description:da *SIKKERT* fjern 10-minutters chat-nulstillinger + *konstante netværksfejl* og Cloudflare-tjek fra ChatGPT.
// @description:de *SICHER* entfernen Sie 10-Minuten-Chat-Zurücksetzungen + *kontinuierliche Netzwerkfehler* und Cloudflare-Überprüfungen aus ChatGPT.
// @description:dv ChatGPT އިން ދޮގު ނަތީޖާ ގެ ގޮތުން ދިމާވާ މިނެޓުގެ އަޑުގަދަވުމުގެ ވަގުތު އަލުން ސެޓްކުރުން 10 ގެ އަދަދު އަނބުރާ ގެނެސްދިނުމާއެކު + *ތެރޭގައި ހުރި ނެޓްވޯކް މައްސަލަތަކާއި* ކްލައުޑްފްލެއަރގެ ޗެކްތައް ދޫކުރުން ބޭނުންވެއެވެ.
// @description:dz *དགའ་བསྐྱིད་བཞུགས་བརྡ* མི་ཉུང་སྐར་མ་གི་ཟའ་གྲགས་རིམ་ལེབ་འགྱུར་བསྡད་མེད་པ། *ངོས་འཛིན་ཡོད་པ་* Cloudflare་བཤད་པ་བཟོ་བའི་ཕྱིར་ ChatGPT ནས་ཕྱི་ལོག །
// @description:el *ΜΕ ΑΣΦΑΛΕΙΑ* εξαλείψτε τις επαναφορές συνομιλίας 10 λεπτών + *συνεχείς σφάλματα δικτύου* και ελέγχους Cloudflare από το ChatGPT.
// @description:eo *SEKURE* forigu 10-minutajn babiletajajn rekomencigojn + *konstantajn reto-erarojn* kaj Cloudflare-kontrolojn de ChatGPT.
// @description:es *SEGURO* elimine los reinicios de chat de 10 minutos + *errores de red constantes* y verificaciones de Cloudflare de ChatGPT.
// @description:et *TURVALISELT* eemalda ChatGPT-st 10-minutilised vestluse lähtestamised + *püsivad võrguvead* ja Cloudflare'i kontrollid.
// @description:eu *SEGUROA* kendu ChatGPT-tik 10 minutuko txat berrabiarazteak + *sareko akats etengabeak* eta Cloudflare egiaztapenak.
// @description:fa *به طور ایمن* بازنشانی چت 10 دقیقه ای + *خطاهای مداوم شبکه* و بررسی های Cloudflare را از ChatGPT حذف کنید.
// @description:fi *TURVALLISESTI* poista ChatGPT:stä 10 minuutin keskustelun nollaukset + *jatkuvat verkkovirheet* ja Cloudflare-tarkistukset.
// @description:fo *TRYGT* strika 10 minuttir endursetan av samrøðum + *staðug netbrek* og Cloudflare-royndir frá ChatGPT.
// @description:fr *EN TOUTE SÉCURITÉ* éliminez les réinitialisations de chat de 10 minutes + *les erreurs réseau constantes* et les vérifications Cloudflare de ChatGPT.
// @description:fr-CA *EN TOUTE SÉCURITÉ* éliminez les réinitialisations de chat de 10 minutes + *les erreurs réseau constantes* et les vérifications Cloudflare de ChatGPT.
// @description:gd *GU SÀBHALTE* thoir air falbh ath-shuidheachadh còmhraidh 10 mionaid + *mearachdan lìonraidh leantainneach* agus sgrùdaidhean Cloudflare à ChatGPT.
// @description:gl *SEGURAMENTE* elimine os reinicios de conversa de 10 minutos + *erros de rede constantes* e verificacións de Cloudflare de ChatGPT.
// @description:gu ChatGPT માંથી ૧૦ મિનિટના ચૅટ રીસેટ, *સ્થાયી નેટવર્ક ભૂલો* અને ક્લાઉડફ્લેર તપાસો *સુરક્ષિતપણે* દૂર કરો.
// @description:haw *KUHIAO* wehe i ka hoʻomaʻemaʻe ʻana i nā hoʻouka hou ʻana o ka walaʻau no 10 minuke + mau ʻano hihia mau loa o ka nahenahe + nā hoʻokolokolo o Cloudflare, mai ke keʻena nei o ChatGPT.
// @description:he *בטחון* הסירו איפוסי צ'אט של 10 דקות + *שגיאות רשת קבועות* ובדיקות קלאודפלייר מ-ChatGPT.
// @description:hi ChatGPT से 10 मिनट के चैट रीसेट, *स्थायी नेटवर्क त्रुटियाँ* और क्लाउडफ़्लेयर जाँच को *सुरक्षित रूप से* हटाएं।
// @description:hr *SIGURNO* uklonite 10-minutna resetiranja čavrljanja, *stalne mrežne pogreške* i Cloudflare provjere iz ChatGPT-a.
// @description:ht *AN SEKIRITE,* elimine resè chat 10 minit yo, *erè sou rezo ki konstan* epitou tchèk Cloudflare nan ChatGPT.
// @description:hu *BIZTONSÁGOSAN* távolítsa el a 10 perces csevegések visszaállításait, a *folyamatos hálózati hibákat* és a Cloudflare ellenőrzéseket a ChatGPT-ből.
// @description:hy *ԱՆՎՏԱՆԳՈՒԹՅՈՒՆ ՀԱՍԿԱՑՈՒՄԸ`* հեռացնել 10 րոպեանոց չատի վերագործարկումները, *մշտական ցանցային սխալները* եւ Cloudflare ստուգումները ChatGPT-ից:
// @description:id *AMAN* menghapus batas obrolan 10 menit, *kesalahan jaringan yang konstan*, dan pemeriksaan Cloudflare dari ChatGPT.
// @description:is *ÖRUGGLEGA* fjarlægðu endurstillingu spjalls í 10 mínútur, *sífelldum netvillum* og Cloudflare prófanir úr ChatGPT.
// @description:it *IN SICUREZZA* eliminare i reset della chat di 10 minuti, *gli errori di rete costanti* e i controlli Cloudflare da ChatGPT.
// @description:ja ChatGPTから10分のチャットのリセット、*定常的なネットワークのエラー*、Cloudflareのチェックを*安全に*削除してください。
// @description:jv *AMAN* busak wates obrolan 10 menit, *kesalahan jaringan sing konstan*, lan pemeriksaan Cloudflare saka ChatGPT.
// @description:ka *უსაფრთხოდ* წაშალეთ 10 წუთიანი ჩეთის დაბრუნებები, *მუდმივი ქსელური შეცდომები* და Cloudflare შემოწმებები ChatGPT-დან.
// @description:kk *ҚАУІПСІЗ* ChatGPT дан 10 минуттық чат қайта орнатуларды, *тұрақты желі қателерін* және Cloudflare тексерістерін жойыңыз.
// @description:km *ដោយសុវត្ថិភាព* លុបការកំណត់ឡើងវិញនៃការជជែក 10 នាទី, *កំហុសបណ្តាញជាក់លាក់* និងការពិនិត្យរបស់ Cloudflare ចេញពី ChatGPT។
// @description:kn ChatGPT ನಿಂದ 10 ನಿಮಿಷಗಳ ಚಾಟ್ ಮರುಹೊಂದಿಕೆಗಳು, *ನಿರಂತರ ಜಾಲ ದೋಷಗಳು* ಮತ್ತು ಕ್ಲೌಡ್ಫ್ಲೇರ್ ಪರಿಶೀಲನೆಗಳನ್ನು *ಸುರಕ್ಷಿತವಾಗಿ* ತೆಗೆದುಹಾಕಿ.
// @description:ko ChatGPT에서 10분 채팅 재설정, *지속적인 네트워크 오류*, 클라우드플레어 검사를 *안전하게* 제거하십시오.
// @description:ku *بە ئاسایی* ڕیسێتی چاتی ١٠ خولەکی، *کێشەی شبکەیی ڕاستەوخۆ* و دیاریکردنی کلاڵدفلەر لە ChatGPT دابڕۆ.
// @description:ky *КООПСУЗДУК МЕНЕН* ChatGPT дан 10 мүнөттүк чаттын кайра жөндөөсүн, *туруктуу тармак каталарын* жана Cloudflare текшерүүлөрүн алып салыңыз.
// @description:la *TUTO* dele 10 minutarum colloquii reconsitutiones, *crebros errores retis* et inspectiones Cloudflare ab ChatGPT.
// @description:lb *SÉCHER* Huel 10 Minutte Chat-Limitt-Reschtellungen, *bestänneg Netzwierker-Feeler* an d'Cloudflare-Iwwerpréifunge fort vu ChatGPT.
// @description:lo *ດ້ວຍຄວາມປອດໄພ* ລຶບການຕັ້ງຄ່າໃຫມ່ການແຊັດ 10 ນາທീ, *ຂໍ້ຜິດພາດເຄືອຂ່າຍປະຈໍາ* ແລະ ການກວດສອບຂອງ Cloudflare ອອກຈາກ ChatGPT.
// @description:lt *SAUGIAI* pašalinkite 10 minučių pokalbių atstatymus, *nuolatinius tinklo trikdžius* ir Cloudflare patikras iš ChatGPT.
// @description:lv *DROŠI* noņemiet 10 minūšu čata atiestatījumus, *pastāvīgās tīkla kļūdas* un Cloudflare pārbaudes no ChatGPT.
// @description:mg *MIANDRY ARA-KIRA* esory ny fandrombahana ny fisalasana 10 minitra, *ny diso amin'ny tambajotra mandritra* ary ny fanamarinana amin'ny Cloudflare avy amin'ny ChatGPT.
// @description:mi *KA TŪTURU* whakakorehia ngā whakatikatika kōrero 10 meneti, *hapa whatunga rāroto e tohu tonu ana + ngā aroturuki Cloudflare i ChatGPT.
// @description:mk *БЕЗБЕДНО* отстранете ги 10-минутните повторни вклучувања на разговорот, *константни мрежни грешки* и проверките на Cloudflare од ChatGPT.
// @description:ml ChatGPT നിന്ന് 10 മിനിറ്റ് ചാറ്റ് പുനഃസജ്ജമാക്കലുകൾ, *തുടർച്ചയായ നെറ്റ്വർക്ക് പിശകുകൾ*, ക്ലൗഡ്ഫ്ലെയർ പരിശോധനകൾ *സുരക്ഷിതമായി* നീക്കം ചെയ്യുക.
// @description:mn ChatGPT-с *АЮУЛГҮЙ БОЛОВЧ* 10 минутын чат дахин тохирохыг, *үргэлжилсэн сүлжээний алдаа* болон Cloudflare-ийн шалгалтуудыг хасна уу.
// @description:mr ChatGPT मधून *सुरक्षितपणे* १० मिनिटांची गप्पागोष्टी पुन्हा सेट करणे, *सातत्याने नेटवर्क त्रुटी* आणि क्लाउडफ्लेअर तपासणी काढून टाका.
// @description:ms *DENGAN SELAMAT* singkirkan had sembang semula 10 minit, *kesalahan rangkaian yang kerap*, dan semakan Cloudflare daripada ChatGPT.
// @description:mt *B'SIGURTÀ* neħħi l-limiti ta' risettjar tal-kliem ta' 10 minuta, *żbalji fil-network persistenti*, u kontrolli ta' Cloudflare minn ġewwa ChatGPT.
// @description:my ChatGPT မှ *လုံးဝ လုံခြုံစွာ* ၁၀ မိနစ် စကားပြောရန် ပြန်လည် သတ်မှတ်ချက်များ၊ *မြောက်မြောက် ကွန်ရက် ပြၚ အမှား* များနှင့် Cloudflare စစ်ဆေးမှုများကို ဖယ်ရှားပါ။
// @description:ne ChatGPT बाट *सुरक्षितरूपमा* १० मिनेटको च्याट पुनःसेट, *निरन्तर नेटवर्क त्रुटि* र क्लाउडफ्लेयर जाँच हटाउनुहोस्।
// @description:nl *VEILIG* verwijder 10-minuten chat resets, *constante netwerkfouten* en Cloudflare-controles van ChatGPT.
// @description:no *TRYGT* fjern 10-minutters chat-tilbakestillinger, *konstante nettverksfeil* og Cloudflare-sjekker fra ChatGPT.
// @description:ny *NDIWOYIMILIRENI* tsikani kupindulitsanso kogawana kwamizuzu khumi + *zolakwika zambirimbiri pa intaneti* ndi zolingalira za Cloudflare kuchokera ku ChatGPT.
// @description:pa ChatGPT ਤੋਂ *ਸੁਰੱਖਿਅਤ ਢੰਗ ਨਾਲ* 10 ਮਿੰਟ ਦੀਆਂ ਚੈਟ ਰੀ-ਸੈਟਾਂ, *ਲਗਾਤਾਰ ਨੈੱਟਵਰਕ ਗਲਤੀਆਂ* ਅਤੇ ਕਲਾਉਡਫਲੇਅਰ ਜਾਂਚਾਂ ਹਟਾਓ।
// @description:pap *SEGURO* eliminá rekashonan di chat di 10 minüt, *faltanan di red kontínuo* i kontròlnan di Cloudflare for di ChatGPT.
// @description:pl *BEZPIECZNIE* usuń 10-minutowe resetowanie czatu, *stałe błędy sieciowe* i kontrole Cloudflare z ChatGPT.
// @description:ps له ChatGPT څخه *په امنه* توګه د ۱۰ دقیقو چت بیا ټاکل کول، *دوامداره شبکي غلطي* او Cloudflare بررسۍ لرې کړئ.
// @description:pt *COM SEGURANÇA* elimine resets de chat de 10 minutos, *erros de rede constantes* e verificações do Cloudflare do ChatGPT.
// @description:pt-BR *COM SEGURANÇA* elimine as redefinições de chat de 10 minutos, *erros frequentes de rede* e checagens do do Cloudflare do ChatGPT.
// @description:rn *MU BUNYAMINE* gukuraho ingaruka zo gusegurira imyumvire icumi, amakosa akomeye yo mu murongo w'ubucuruzi no kugenzura amabuye ya Cloudflare ukufuma mu ChatGPT.
// @description:ro *ÎN SIGURANȚĂ* eliminați reinițializările de chat de 10 minute, erorile constante de rețea și verificările Cloudflare din ChatGPT.
// @description:ru *БЕЗОПАСНО* устраните 10-минутные сбросы чата, постоянные сетевые ошибки и проверки Cloudflare из ChatGPT.
// @description:rw *MU BUNYAMINE* ikuraho iseswa ry’iminota 10, amakosa akomeje kw’itumanaho mu rwego rw’ibikorwaremezo n’igenzura rya Cloudflare mu ChatGPT.
// @description:sg *NI ÌTỌJU* ṣe ìyọ̀sọ́wọ́jú ọrọ̀'lọ̀wọ́ mẹ́rinlelogun, awọn ṣiṣe ilana aláilóbájẹ́ + awọn adánilọ́jọ́ Cloudflare láti inú ChatGPT.
// @description:si *ආරක්ෂිතව* 10 මිනිත්තු චැට් යළි සැකසීම්, ස්ථිර ජාල දෝෂ සහ Cloudflare පරීක්ෂණ ChatGPT වෙතින් ඉවත් කරන්න.
// @description:sk *BEZPEČNE* odstráňte 10-minútové opätovné nastavenia četu, neustále sieťové chyby a kontroly Cloudflare z ChatGPT.
// @description:sl *VARNO* odstranite 10-minutna ponastavljanja klepetov, nenehne napake v omrežju in preverjanja cloudfare iz ChatGPT.
// @description:sm *MA FA'AMANUIAGA* ia eseese fa'amalosi e tusi tulaga tautua ta'aloga e 10 minute + tala esemanuuga + nisi'i Cloudflare mai ChatGPT.
// @description:sn *KANA KUTAMBA WAKAWANDA* dzimba kupindura zvakare maonero echirongwa che10min + zvivi zvisingakoni nekupera + ruzivo rweCloudflare uye kubvisa zviri muChatGPT.
// @description:so *SI AMMAAN* ka saar 10 daqiiqo dib u habayn xidhiidh + xatooyin xaaladaha ah + baaritaan Cloudflare ka mid ah ChatGPT.
// @description:sr *BEZBEDNO* eliminišite 10-minutna resetovanja ćaska, konstantne mrežne greške i Cloudflare provere iz ChatGPT-a.
// @description:sv *SÄKERT* eliminera 10-minuters återställningar av chattar, konstanta nätverksfel och Cloudflare-kontroller från ChatGPT.
// @description:sw *KWA USALAMA* ondoa marejesho ya mazungumzo ya dakika 10, hitilafu endelevu za mtandao na ukaguzi wa Cloudflare kutoka ChatGPT.
// @description:ta *பாதுகாப்பாக* 10 நிமிட உரையாடல் மறுதொடக்கங்கள், தொடர்ச்சியான வலையமைப்பு பிழைகள், மேகக்கம்பெனி சோதனைகளை ChatGPT இருந்து அகற்றுங்கள்.
// @description:te *సురక్షితంగా* 10 నిమిషాల చాట్ రీసెట్లు, నిరంతర నెట్వర్క్ లోపాలు, క్లౌడ్ఫ్లేర్ తనిఖీలను ChatGPT నుండి తీసివేయండి.
// @description:tg *БО ҲИФЗИ АМНИЯТ* 10-дақиқагии бозсозии чат, хатогиҳои доимии шабака ва санҷиши Cloudflare-ро аз ChatGPT ҳазф намоед.
// @description:th *อย่างปลอดภัย* กําจัดการรีเซ็ตแชท 10 นาที ข้อผิดพลาดของเครือข่ายตลอดเวลา และการตรวจสอบของ Cloudflare ออกจาก ChatGPT
// @description:ti *ብናይ ደሞዝ* 10 ደቂቕ ድምጺ ናይ መጀመርታ ምቕራብን, ናይ ሕፅይቲ ምእታይን, ናይ Cloudflare ፍልጠትን ካብ ChatGPT ክወግዙ::
// @description:tk *HOWPSUZLYK BILEN* 10 minutly çat ýeniden başlatmalaryny, durnukly internet ýalňyşlaryny we Cloudflare barlagyny ChatGPT-den aýyrыň.
// @description:tn *KA POLAOKEHI* e ntšha thekiso ya ho qala hape ya metsotso e 10 + diphoso tsa neteweke tse kileng + dipatlisiso tsa Cloudflare ho tswa ho ChatGPT.
// @description:to *'I HE FA'A'EA'EA'ANGA* 'e aveese 'a e ngaahi fili 'o e fetu'utaki chatí ki he meniti 'e 10 + hili pea 'o e ngaahi me'angaue'aki 'a e néétuiaki + ngaahi sivi 'o e Cloudflare mei he ChatGPT.
// @description:tr *GÜVENLİ BİR ŞEKİLDE* 10 dakikalık sohbet sıfırlamalarını, sürekli ağ hatalarını ve Cloudflare kontrollerini ChatGPT'ten kaldırın.
// @description:uk *БЕЗПЕЧНО* усуньте 10-хвилинні скинення чату, постійні мережеві помилки та перевірки Cloudflare з ChatGPT.
// @description:ur *محفوظ* ChatGPT سے 10 منٹ کی چیٹ ری سیٹس، مستقل نیٹ ورک نقص اور کلاؤڈ فلیئر چیکس ہٹائیں۔
// @description:uz *XAVFSIZ* 10 daqiqa suhbat qayta tiklanishlarini, doimiy tarmoq xatoliklarini va Cloudflare tekshiruvlarini ChatGPT'dan olib tashlang.
// @description:vi *AN TOÀN* loại bỏ đặt lại trò chuyện 10 phút, lỗi mạng liên tục và kiểm tra Cloudflare khỏi ChatGPT.
// @description:xh *NGEKONAKALIYO* susa ukunqamula okutsha koxo yemizuzu eli-10 + amathuba olu hlulekileyo womeli + ukuhlolwa kukaCloudflare ukusuka ku ChatGPT.
// @description:yi *זיכער* נעמט אַראָפ 10 מינוט רעד איבערארבעטן, שטענדיק נעץ פֿעלערן און קלוידפֿלאַרע באַשעקן פֿון ChatGPT.
// @description:zh *安全* 消除 10 分钟聊天重置 + 持续的网络错误 + ChatGPT 的 Cloudflare 检查。
// @description:zh-CN *安全* 消除 10 分钟聊天重置 + 持续的网络错误 + ChatGPT 的 Cloudflare 检查。
// @description:zh-HK *安全* 消除 10 分鐘聊天重設 + 持續的網路錯誤 + ChatGPT 的 Cloudflare 檢查。
// @description:zh-SG *安全* 消除 10 分钟聊天重置 + 持续的网络错误 + ChatGPT 的 Cloudflare 检查。
// @description:zh-TW *安全* 消除 10 分鐘聊天重設 + 持續的網路錯誤 + ChatGPT 的 Cloudflare 檢查。
// @description:zu *NGOKUPHEPHA* susa ukusetha kabusha ingxoxo yemizuzu eyi-10 + amaphutha enethiwekhi ahlala njalo + Ukuhlolwa kwe-Cloudflare ku-ChatGPT.
// @author Adam Lui
// @namespace https://github.com/adamlui
// @version 2024.8.29
// @license MIT
// @match *://chatgpt.com/*
// @match *://chat.openai.com/*
// @compatible chrome
// @compatible firefox
// @compatible edge
// @compatible opera
// @compatible brave
// @compatible vivaldi
// @compatible waterfox
// @compatible librewolf
// @compatible ghost
// @compatible qq
// @icon https://media.chatgptautorefresh.com/images/icons/openai/black/icon48.png?c56f963
// @icon64 https://media.chatgptautorefresh.com/images/icons/openai/black/icon64.png?c56f963
// @require https://cdn.jsdelivr.net/npm/@kudoai/chatgpt.js@3.1.0/dist/chatgpt.min.js#sha256-7NZavwKnOeU+AC6WBVJP9kl6BNFlT7go8qSKat7Ey4Y=
// @connect cdn.jsdelivr.net
// @connect greasyfork.org
// @grant GM_setValue
// @grant GM_getValue
// @grant GM_registerMenuCommand
// @grant GM_unregisterMenuCommand
// @grant GM_xmlhttpRequest
// @grant GM.xmlHttpRequest
// @run-at document-start
// @noframes
// @homepageURL https://www.chatgptautorefresh.com
// @supportURL https://support.chatgptautorefresh.com
// @contributionURL https://github.com/sponsors/adamlui
// ==/UserScript==
// Documentation: https://docs.chatgptautorefresh.com
// NOTE: This script relies on the powerful chatgpt.js library @ https://chatgpt.js.org © 2023–2024 KudoAI & contributors under the MIT license.
(async () => {
// Init CONFIG
const config = {
appName: 'ChatGPT Auto Refresh', appSymbol: '↻', keyPrefix: 'chatGPTautoRefresh',
gitHubURL: 'https://github.com/adamlui/chatgpt-auto-refresh',
greasyForkURL: 'https://greasyfork.org/scripts/462422-chatgpt-auto-refresh',
mediaHostURL: 'https://media.chatgptautorefresh.com/',
latestAssetCommitHash: '0e54b0c' } // for cached messages.json + navicon
config.updateURL = config.greasyForkURL.replace('https://', 'https://update.')
.replace(/(\d+)-?([a-zA-Z-]*)$/, (_, id, name) => `${ id }/${ !name ? 'script' : name }.meta.js`)
config.supportURL = 'https://support.chatgptautorefresh.com'
config.assetHostURL = config.gitHubURL.replace('github.com', 'cdn.jsdelivr.net/gh') + `@${config.latestAssetCommitHash}/`
config.userLanguage = chatgpt.getUserLanguage()
loadSetting('arDisabled', 'notifDisabled', 'refreshInterval', 'toggleHidden')
if (!config.refreshInterval) saveSetting('refreshInterval', 30) // init refresh interval to 30 secs if unset
// Prevent sporadic convo RESETS
const ogAEL = EventTarget.prototype.addEventListener
EventTarget.prototype.addEventListener = function(type, listener, optionsOrUseCapture) {
let calledByOpenAI = false
if (type == 'focus' && this === unsafeWindow || type == 'visibilitychange') {
const callStack = new Error().stack + '\n',
aelCaller = /-extension:\/\/.*\n(.+)/.exec(callStack)?.[1]
calledByOpenAI = !aelCaller?.includes('-extension://')
if (calledByOpenAI && type == 'visibilitychange') {
ogAEL.call(this, type, function(event) {
if (document.visibilityState != 'visible') listener.call(this, event)
}, optionsOrUseCapture)
}}
if (!calledByOpenAI) ogAEL.apply(this, arguments)
}
// Init FETCHER
const xhr = getUserscriptManager() == 'OrangeMonkey' ? GM_xmlhttpRequest : GM.xmlHttpRequest
// Init MESSAGES
let msgs = {}
if (!config.userLanguage.startsWith('en')) msgs = await new Promise(resolve => {
const msgHostDir = config.assetHostURL + 'greasemonkey/_locales/',
msgLocaleDir = ( config.userLanguage ? config.userLanguage.replace('-', '_') : 'en' ) + '/'
let msgHref = msgHostDir + msgLocaleDir + 'messages.json', msgXHRtries = 0
xhr({ method: 'GET', url: msgHref, onload: onLoad })
function onLoad(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 up to 3X (original/region-stripped/EN) only
msgHref = config.userLanguage.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
xhr({ method: 'GET', url: msgHref, onload: onLoad })
}
}
})
// Init MENU objs
const menuIDs = [] // to store registered cmds for removal while preserving order
const menuState = {
symbol: ['❌', '✔️'], word: ['OFF', 'ON'],
separator: getUserscriptManager() == 'Tampermonkey' ? ' — ' : ': '
}
registerMenu() // create browser toolbar menu
// Init UI flags
await Promise.race([chatgpt.isLoaded(), new Promise(resolve => setTimeout(resolve, 5000))]) // initial UI loaded
await chatgpt.sidebar.isLoaded()
const isFirefox = chatgpt.browser.isFirefox(),
isGPT4oUI = document.documentElement.className.includes(' '),
firstLink = chatgpt.getNewChatLink()
// Add/update TWEAKS style
const tweaksStyleUpdated = 20240724 // datestamp of last edit for this file's `tweaksStyle`
let tweaksStyle = document.getElementById('tweaks-style') // try to select existing style
if (!tweaksStyle || parseInt(tweaksStyle.getAttribute('last-updated'), 10) < tweaksStyleUpdated) { // if missing or outdated
if (!tweaksStyle) { // outright missing, create/id/attr/append it first
tweaksStyle = document.createElement('style') ; tweaksStyle.id = 'tweaks-style'
tweaksStyle.setAttribute('last-updated', tweaksStyleUpdated.toString())
document.head.append(tweaksStyle)
}
tweaksStyle.innerText = (
( chatgpt.isDarkMode() ? '.chatgpt-modal > div { border: 1px solid white }' : '' )
+ '.chatgpt-modal button {'
+ 'font-size: 0.77rem ; text-transform: uppercase ;'
+ 'border-radius: 0 !important ; padding: 5px !important ; min-width: 102px }'
+ '.chatgpt-modal button:hover { transform: scale(1.055) }'
+ '.modal-buttons { margin-left: -13px !important }'
+ '* { scrollbar-width: thin }' // make FF scrollbar skinny to not crop toggle
+ '.sticky div:active, .sticky div:focus {' // post-GPT-4o UI sidebar button container
+ 'transform: none !important }' // disable distracting click zoom effect
)
}
// Create NAV TOGGLE div, add styles
const navToggleDiv = document.createElement('div')
navToggleDiv.style.height = '37px'
navToggleDiv.style.margin = '2px 0' // add v-margins
navToggleDiv.style.userSelect = 'none' // prevent highlighting
navToggleDiv.style.cursor = 'pointer' // add finger cursor
updateToggleHTML() // create children
if (firstLink) { // borrow/assign CLASSES from sidebar div
const firstIcon = firstLink.querySelector('div:first-child'),
firstLabel = firstLink.querySelector('div:nth-child(2)')
navToggleDiv.classList.add(...firstLink.classList, ...firstLabel.classList)
navToggleDiv.querySelector('img')?.classList.add(...firstIcon.classList)
}
insertToggle()
// Add LISTENER to toggle switch/label/config/menu/auto-refresh
navToggleDiv.onclick = () => {
const toggleInput = document.getElementById('auto-refresh-toggle-input')
toggleInput.checked = !toggleInput.checked ; config.arDisabled = !toggleInput.checked
updateToggleHTML() ; refreshMenu()
if (!config.arDisabled && !chatgpt.autoRefresh.isActive) {
chatgpt.autoRefresh.activate(config.refreshInterval)
if (!config.notifDisabled) notify(( msgs.menuLabel_autoRefresh || 'Auto-Refresh' ) + ': ON')
} else if (config.arDisabled && chatgpt.autoRefresh.isActive) {
chatgpt.autoRefresh.deactivate()
if (!config.notifDisabled) notify(( msgs.menuLabel_autoRefresh || 'Auto-Refresh' ) + ': OFF')
} saveSetting('arDisabled', config.arDisabled)
}
// Monitor <html> to maintain SIDEBAR TOGGLE VISIBILITY on node changes
const nodeObserver = new MutationObserver(mutations => { mutations.forEach(mutation => {
if (mutation.type == 'childList' && mutation.addedNodes.length) insertToggle() })})
nodeObserver.observe(document.documentElement, { childList: true, subtree: true })
// Activate AUTO-REFRESH on first visit if enabled
if (!config.arDisabled) {
chatgpt.autoRefresh.activate(config.refreshInterval)
if (!config.notifDisabled) notify(( msgs.menuLabel_autoRefresh || 'Auto-Refresh' ) + ': ON')
}
// Define SCRIPT functions
function loadSetting(...keys) { keys.forEach(key => { config[key] = GM_getValue(config.keyPrefix + '_' + key, false) })}
function saveSetting(key, value) { GM_setValue(config.keyPrefix + '_' + key, value) ; config[key] = value }
function safeWindowOpen(url) { window.open(url, '_blank', 'noopener') } // to prevent backdoor vulnerabilities
function getUserscriptManager() { try { return GM_info.scriptHandler } catch (err) { return 'other' }}
// Define MENU functions
function registerMenu() {
// Add command to toggle auto-refresh
const arLabel = menuState.symbol[+!config.arDisabled] + ' '
+ ( msgs.menuLabel_autoRefresh || 'Auto-Refresh' ) + ' ↻ '
+ menuState.separator + menuState.word[+!config.arDisabled]
menuIDs.push(GM_registerMenuCommand(arLabel, () => {
document.getElementById('auto-refresh-switch-span').click()
}))
// Add command to toggle visibility of toggle
const tvLabel = menuState.symbol[+!config.toggleHidden] + ' '
+ ( msgs.menuLabel_toggleVis || 'Toggle Visibility' )
+ menuState.separator + menuState.word[+!config.toggleHidden]
menuIDs.push(GM_registerMenuCommand(tvLabel, () => {
saveSetting('toggleHidden', !config.toggleHidden)
navToggleDiv.style.display = config.toggleHidden ? 'none' : 'flex' // toggle visibility
if (!config.notifDisabled) notify((
msgs.menuLabel_toggleVis || 'Toggle Visibility' ) + ': '+ menuState.word[+!config.toggleHidden])
refreshMenu()
}))
// Add command to show notifications when switching modes
const mnLabel = menuState.symbol[+!config.notifDisabled] + ' '
+ ( msgs.menuLabel_modeNotifs || 'Mode Notifications' )
+ menuState.separator + menuState.word[+!config.notifDisabled]
menuIDs.push(GM_registerMenuCommand(mnLabel, () => {
saveSetting('notifDisabled', !config.notifDisabled)
notify(( msgs.menuLabel_modeNotifs || 'Mode Notifications' ) + ': ' + menuState.word[+!config.notifDisabled])
refreshMenu()
}))
// Add command to change refresh interval
const riLabel = '⌚ ' + ( msgs.menuLabel_refreshInt || 'Refresh Interval' ) + ' '
+ menuState.separator + config.refreshInterval + 's'
menuIDs.push(GM_registerMenuCommand(riLabel, () => {
while (true) {
const refreshInterval = prompt(
`${ msgs.prompt_updateInt || 'Update refresh interval (in secs)' }:`, config.refreshInterval)
if (refreshInterval === null) break // user cancelled so do nothing
else if (!isNaN(parseInt(refreshInterval, 10)) && parseInt(refreshInterval, 10) > 0) { // valid int set
saveSetting('refreshInterval', parseInt(refreshInterval, 10))
if (chatgpt.autoRefresh.isActive) { // reset running auto-refresh
chatgpt.autoRefresh.deactivate()
chatgpt.autoRefresh.activate(refreshInterval)
}
refreshMenu()
const minInterval = Math.max(2, config.refreshInterval - 10),
maxInterval = config.refreshInterval + 10
siteAlert(( msgs.alert_intUpdated || 'Interval updated' ) + '!',
( msgs.alert_willRefresh || 'ChatGPT session will auto-refresh every ' )
+ `${ minInterval }–${ maxInterval } ${ msgs.unit_secs || 'secs' }`
)
break
}}}))
// Add command to launch About modal
const amLabel = `💡 ${ msgs.menuLabel_about || 'About' } ${ msgs.appName || config.appName }`
menuIDs.push(GM_registerMenuCommand(amLabel, launchAboutModal))
}
function refreshMenu() {
if (getUserscriptManager() == 'OrangeMonkey') return
for (const id of menuIDs) { GM_unregisterMenuCommand(id) } registerMenu()
}
function launchAboutModal() {
// Init data/styles
const chatgptJSver = (/chatgpt-([\d.]+)\.min/.exec(GM_info.script.header) || [null, ''])[1],
headingStyle = 'font-size: 1.15rem',
pStyle = 'position: relative ; left: 3px',
pBrStyle = 'position: relative ; left: 4px ',
aStyle = 'color: ' + ( chatgpt.isDarkMode() ? '#c67afb' : '#8325c4' ) // purple
// Show modal
const aboutModalID = siteAlert(
msgs.appName || config.appName, // title
`<span style="${ headingStyle }"><b>🏷️ <i>${ msgs.about_version || 'Version' }</i></b>: </span>`
+ `<span style="${ pStyle }">${ GM_info.script.version }</span>\n`
+ `<span style="${ headingStyle }"><b>⚡ <i>${ msgs.about_poweredBy || 'Powered by' }</i></b>: </span>`
+ `<span style="${ pStyle }"><a style="${ aStyle }" href="https://chatgpt.js.org" target="_blank" rel="noopener">`
+ 'chatgpt.js</a>' + ( chatgptJSver ? ( ' v' + chatgptJSver ) : '' ) + '</span>\n'
+ `<span style="${ headingStyle }"><b>📜 <i>${ msgs.about_sourceCode || 'Source code' }</i></b>:</span>\n`
+ `<span style="${ pBrStyle }"><a href="${ config.gitHubURL }" target="_blank" rel="nopener">`
+ config.gitHubURL + '</a></span>',
[ // buttons
function checkForUpdates() { updateCheck() },
function getSupport() { safeWindowOpen(config.supportURL) },
function leaveAReview() { safeWindowOpen(config.greasyForkURL + '/feedback#post-discussion') },
function moreChatGPTapps() { safeWindowOpen('https://github.com/adamlui/chatgpt-apps') }
], '', 478 // set width
)
// Re-format buttons to include emoji + localized label + hide Dismiss button
for (const button of document.getElementById(aboutModalID).querySelectorAll('button')) {
if (/updates/i.test(button.textContent)) button.textContent = (
'🚀 ' + ( msgs.btnLabel_updateCheck || 'Check for Updates' ))
else if (/support/i.test(button.textContent)) button.textContent = (
'🧠 ' + ( msgs.btnLabel_getSupport || 'Get Support' ))
else if (/review/i.test(button.textContent)) button.textContent = (
'⭐ ' + ( msgs.btnLabel_leaveReview || 'Leave Review' ))
else if (/apps/i.test(button.textContent)) button.textContent = (
'🤖 ' + ( msgs.btnLabel_moreApps || 'More ChatGPT Apps' ))
else button.style.display = 'none' // hide Dismiss button
}
}
function updateCheck() {
// Fetch latest meta
const currentVer = GM_info.script.version
xhr({
method: 'GET', url: config.updateURL + '?t=' + Date.now(),
headers: { 'Cache-Control': 'no-cache' },
onload: response => { const updateAlertWidth = 377
// Compare versions
const latestVer = /@version +(.*)/.exec(response.responseText)[1]
for (let i = 0 ; i < 4 ; i++) { // loop thru subver's
const currentSubVer = parseInt(currentVer.split('.')[i], 10) || 0,
latestSubVer = parseInt(latestVer.split('.')[i], 10) || 0
if (currentSubVer > latestSubVer) break // out of comparison since not outdated
else if (latestSubVer > currentSubVer) { // if outdated
// Alert to update
const updateModalID = siteAlert(`🚀 ${ msgs.alert_updateAvail || 'Update available' }!`, // title
`${ msgs.alert_newerVer || 'An update to' } ${ config.appName } `
+ ( msgs.appName || config.appName ) + ' '
+ `(v${ latestVer }) ${ msgs.alert_isAvail || 'is available' }! `
+ '<a target="_blank" rel="noopener" style="font-size: 0.7rem" '
+ 'href="' + config.gitHubURL + '/commits/main/greasemonkey/'
+ config.updateURL.replace(/.*\/(.*)meta\.js/, '$1user.js') + '"'
+ `> ${ msgs.link_viewChanges || 'View changes' }</a>`,
function update() { // button
safeWindowOpen(config.updateURL.replace('meta.js', 'user.js') + '?t=' + Date.now())
}, '', updateAlertWidth
)
// Localize button labels if needed
if (!config.userLanguage.startsWith('en')) {
const updateAlert = document.querySelector(`[id="${ updateModalID }"]`),
updateBtns = updateAlert.querySelectorAll('button')
updateBtns[1].textContent = msgs.btnLabel_update || 'Update'
updateBtns[0].textContent = msgs.btnLabel_dismiss || 'Dismiss'
}
return
}}
// Alert to no update, return to About modal
siteAlert(( msgs.alert_upToDate || 'Up-to-date' ) + '!', // title
`${ msgs.appName || config.appName } (v${ currentVer }) ` // msg
+ ( msgs.alert_isUpToDate || 'is up-to-date' ) + '!',
'', '', updateAlertWidth
)
launchAboutModal()
}})}
// Define FEEDBACK functions
function notify(msg, position = '', notifDuration = '', shadow = '') {
// Strip state word to append colored one later
const foundState = menuState.word.find(word => msg.includes(word))
if (foundState) msg = msg.replace(foundState, '')
// Show notification
chatgpt.notify(`${ config.appSymbol } ${ msg }`, position, notifDuration, shadow || chatgpt.isDarkMode() ? '' : 'shadow')
const notifs = document.querySelectorAll('.chatgpt-notif'),
notif = notifs[notifs.length -1]
// Append styled state word
if (foundState) {
const styledState = document.createElement('span')
styledState.style.cssText = `color: ${
foundState == menuState.word[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' }`
styledState.append(foundState) ; notif.append(styledState)
}
}
function siteAlert(title = '', msg = '', btns = '', checkbox = '', width = '') {
return chatgpt.alert(title, msg, btns, checkbox, width )}
// Define UI functions
async function insertToggle() {
// Insert toggle
const toggleParent = document.querySelector('nav')
if (!toggleParent.contains(navToggleDiv))
toggleParent.insertBefore(navToggleDiv, toggleParent.children[1])
// Tweak styles
navToggleDiv.style.flexGrow = 'unset' // overcome OpenAI .grow
navToggleDiv.style.paddingLeft = '8px'
document.getElementById('auto-refresh-toggle-knob-span').style.boxShadow = (
'rgba(0, 0, 0, .3) 0 1px 2px 0' + ( chatgpt.isDarkMode() ? ', rgba(0, 0, 0, .15) 0 3px 6px 2px' : '' ))
document.getElementById('auto-refresh-toggle-navicon').src = `${ // update navicon color in case scheme changed
config.mediaHostURL}images/icons/auto-refresh/`
+ `${ chatgpt.isDarkMode() ? 'white' : 'black' }/icon32.png?${config.latestAssetCommitHash}`
}
function updateToggleHTML() {
// Create/size/position navicon
const navicon = document.getElementById('auto-refresh-toggle-navicon') || document.createElement('img')
navicon.id = 'auto-refresh-toggle-navicon'
navicon.style.width = navicon.style.height = '1.25rem'
navicon.style.marginLeft = '2px' ; navicon.style.marginRight = '4px'
// Create/ID/disable/hide/update checkbox
const toggleInput = document.getElementById('auto-refresh-toggle-input') || document.createElement('input')
toggleInput.id = 'auto-refresh-toggle-input' ; toggleInput.type = 'checkbox' ; toggleInput.disabled = true
toggleInput.style.display = 'none' ; toggleInput.checked = !config.arDisabled
// Create/ID/stylize switch
const switchSpan = document.getElementById('auto-refresh-switch-span') || document.createElement('span')
switchSpan.id = 'auto-refresh-switch-span'
const switchStyles = {
position: 'relative', left: `${ chatgpt.browser.isMobile() ? 211 : !firstLink ? 160 : isGPT4oUI ? 147 : 154 }px`,
backgroundColor: toggleInput.checked ? '#ccc' : '#AD68FF', // init opposite final color
bottom: `${ !firstLink ? -0.15 : isFirefox || !isGPT4oUI ? 0.05 : 0 }em`,
width: '30px', height: '15px', '-webkit-transition': '.4s', transition: '0.4s', borderRadius: '28px'
}
Object.assign(switchSpan.style, switchStyles)
// Create/stylize knob, append to switch
const knobSpan = document.getElementById('auto-refresh-toggle-knob-span') || document.createElement('span')
knobSpan.id = 'auto-refresh-toggle-knob-span'
const knobWidth = 12
const knobStyles = {
position: 'absolute', left: '3px', bottom: '1.25px',
width: `${knobWidth}px`, height: `${knobWidth}px`, content: '""', borderRadius: '28px',
transform: toggleInput.checked ? // init opposite final pos
'translateX(0)' : 'translateX(13px) translateY(0)',
backgroundColor: 'white', '-webkit-transition': '0.4s', transition: '0.4s'
}
Object.assign(knobSpan.style, knobStyles) ; switchSpan.append(knobSpan)
// Create/stylize/fill label
const toggleLabel = document.getElementById('auto-refresh-toggle-label') || document.createElement('label')
toggleLabel.id = 'auto-refresh-toggle-label'
if (!firstLink) { // add font size/weight since no firstLink to borrow from
toggleLabel.style.fontSize = '0.875rem' ; toggleLabel.style.fontWeight = 600 }
toggleLabel.style.marginLeft = `-${ !firstLink ? 23 : 41 }px` // left-shift to navicon
toggleLabel.style.cursor = 'pointer' // add finger cursor on hover
toggleLabel.style.width = `${ chatgpt.browser.isMobile() ? 201 : isGPT4oUI ? 145 : 148 }px` // to truncate overflown text
toggleLabel.style.overflow = 'hidden' // to truncate overflown text
toggleLabel.style.textOverflow = 'ellipsis' // to truncate overflown text
toggleLabel.innerText = ( msgs.menuLabel_autoRefresh || 'Auto-Refresh' ) + ' '
+ ( toggleInput.checked ? ( msgs.state_enabled || 'enabled' )
: ( msgs.state_disabled || 'disabled' ))
// Append elements
for (const elem of [navicon, toggleInput, switchSpan, toggleLabel]) navToggleDiv.append(elem)
// Update visual state
navToggleDiv.style.display = config.toggleHidden ? 'none' : 'flex'
setTimeout(() => {
switchSpan.style.backgroundColor = toggleInput.checked ? '#ad68ff' : '#ccc'
switchSpan.style.boxShadow = toggleInput.checked ? '2px 1px 9px #d8a9ff' : 'none'
knobSpan.style.transform = toggleInput.checked ? 'translateX(13px) translateY(0)' : 'translateX(0)'
}, 1) // min delay to trigger transition fx
}
})()