From 0e3f68db7fac30af50209f1f290d1ded4fd28c9f Mon Sep 17 00:00:00 2001 From: shaohuzhang1 Date: Wed, 6 Mar 2024 14:25:39 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E3=80=90=E5=BA=94=E7=94=A8=E3=80=91-=20?= =?UTF-8?q?=E5=B5=8C=E5=85=A5=E7=AC=AC=E4=B8=89=E6=96=B9=E7=9A=84=E7=AA=97?= =?UTF-8?q?=E5=8F=A3=EF=BC=8C=E7=82=B9=E5=87=BB=20X=20=E5=85=B3=E9=97=AD?= =?UTF-8?q?=E7=AA=97=E5=8F=A3=E5=90=8E=EF=BC=8C=E5=9C=A8=E7=82=B9=E5=87=BB?= =?UTF-8?q?=E5=85=A5=E5=8F=A3=E6=97=A0=E6=B3=95=E6=89=93=E5=BC=80=E5=B0=8F?= =?UTF-8?q?=E7=AA=97=E5=8F=A3=EF=BC=8C=E5=8F=AA=E8=83=BD=E5=88=B7=E6=96=B0?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/public/embeb.js | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/ui/public/embeb.js b/ui/public/embeb.js index 163969b88..a91afd5c8 100644 --- a/ui/public/embeb.js +++ b/ui/public/embeb.js @@ -68,30 +68,13 @@ function embedChatbot() { cursor: pointer; ` close_button.onclick = () => { - document.body.removeChild(chat_container) - chat_button.style['display']='block' + chat_container.style['display']='none' } chat_container.append(close_button) document.body.append(chat_container) - let is_404=false chat_button.onclick = ($event) => { - if( chat_container.style['display']=='block'){ - chat_container.style['display']='none' - } else { - if(auth(t.token,t.protocol, t.host)){ - if(is_404){ - document.body.removeChild(chat_container) - document.body.append(chat_container) - - is_404=false - } - chat_container.style['display']='block' - - }else{ - is_404=true - } - } + chat_container.style['display']=chat_container.style['display']=='block'?'none':'block' } sty = document.createElement('style') sty.innerText = ` #chat_container {