summaryrefslogtreecommitdiffstats
path: root/g4f/gui/client/js
diff options
context:
space:
mode:
authorCommenter123321 <36051603+Commenter123321@users.noreply.github.com>2023-10-10 15:54:07 +0200
committerCommenter123321 <36051603+Commenter123321@users.noreply.github.com>2023-10-10 15:54:07 +0200
commit86f7ea6b08657280a2dbcc32851959d2bc9c0e00 (patch)
tree9818beca15bd1600467f4c7888c6559465cd9f0d /g4f/gui/client/js
parentchange discord icon to telegram icon on gui (diff)
downloadgpt4free-86f7ea6b08657280a2dbcc32851959d2bc9c0e00.tar
gpt4free-86f7ea6b08657280a2dbcc32851959d2bc9c0e00.tar.gz
gpt4free-86f7ea6b08657280a2dbcc32851959d2bc9c0e00.tar.bz2
gpt4free-86f7ea6b08657280a2dbcc32851959d2bc9c0e00.tar.lz
gpt4free-86f7ea6b08657280a2dbcc32851959d2bc9c0e00.tar.xz
gpt4free-86f7ea6b08657280a2dbcc32851959d2bc9c0e00.tar.zst
gpt4free-86f7ea6b08657280a2dbcc32851959d2bc9c0e00.zip
Diffstat (limited to 'g4f/gui/client/js')
-rw-r--r--g4f/gui/client/js/chat.v2.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/g4f/gui/client/js/chat.v2.js b/g4f/gui/client/js/chat.v2.js
index 63ec1351..24f2e45b 100644
--- a/g4f/gui/client/js/chat.v2.js
+++ b/g4f/gui/client/js/chat.v2.js
@@ -144,7 +144,7 @@ const ask_gpt = async (message) => {
chunk = new TextDecoder().decode(value);
- if (chunk.includes(`<form id="challenge-form" action="/backend-api/v2/conversation?")) {
+ if (chunk.includes('<form id="challenge-form" action="/backend-api/v2/conversation?"')) {
chunk = `cloudflare token expired, please refresh the page.`;
}
@@ -161,7 +161,7 @@ const ask_gpt = async (message) => {
}
// if text contains :
- if (text.includes(`instead. Maintaining this website and API costs a lot of money`)) {
+ if (text.includes("instead. Maintaining this website and API costs a lot of money")) {
document.getElementById(`gpt_${window.token}`).innerHTML = "An error occured, please reload / refresh cache and try again or use a differnet browser";
}
@@ -547,7 +547,7 @@ colorThemes.forEach((themeOption) => {
setTimeout(() => {
ads_div = document.querySelector('.ads')
- if (ads_div.getElementsByTagName("iframe").length == 0) {
+ if (ads_div != null && ads_div.getElementsByTagName("iframe").length == 0) {
ads_div.removeChild(ads_div.querySelector('.sorry'))
ads_div.innerHTML += `