diff --git a/src/main/resources/web/css/Wtite.css b/src/main/resources/web/css/Wtite.css index 8c6a9845..1733f08c 100644 --- a/src/main/resources/web/css/Wtite.css +++ b/src/main/resources/web/css/Wtite.css @@ -205,11 +205,27 @@ body.c .ThemeColors { } -/* 尾部分 */ +/*插件的验证*/ +.CAPTCHAIframeDIV{ + width: 100%; + display: flex; + flex-direction: column; + align-items: center; + margin-bottom: 2rem; +} +.CAPTCHAIframe{ + min-width: 316px; + max-height: 84px; + overflow: hidden; + border: none; + border-radius: 1rem; + background-color: #ffffffc4; +} +/* 尾部分 */ #tail-in { display: flex; width: 95%; diff --git a/src/main/resources/web/css/bing.css b/src/main/resources/web/css/bing.css index 92d3ed3b..6f1bcdcd 100644 --- a/src/main/resources/web/css/bing.css +++ b/src/main/resources/web/css/bing.css @@ -412,6 +412,22 @@ body:has(.my) #restart { box-shadow: #00000052 0rem 0rem 0.5rem; } +/*插件的验证*/ +.CAPTCHAIframeDIV{ + width: 100%; + display: flex; + flex-direction: column; + align-items: center; + margin-bottom: 2rem; +} +.CAPTCHAIframe{ + min-width: 316px; + max-height: 84px; + overflow: hidden; + border: none; + border-radius: 1rem; + background-color: #ffffffc4; +} /* 提示词 */ diff --git a/src/main/resources/web/js/module/ChatMessage/ParserReturnWorker.js b/src/main/resources/web/js/module/ChatMessage/ParserReturnWorker.js index 0e03d5df..57640874 100644 --- a/src/main/resources/web/js/module/ChatMessage/ParserReturnWorker.js +++ b/src/main/resources/web/js/module/ChatMessage/ParserReturnWorker.js @@ -204,6 +204,9 @@ export default class ParserReturnWorker { this.addError(result.message); if(window.location.protocol==="chrome-extension:"){ this.addError('当前账号请求过多,需要通过机器人检查!无法通过请等待24小时后再试。'); + this.addError('正在尝试通过验证,需要科学上网环境。'); + this.addCAPTCHA(); + this.addError('若无法通过可尝试验证码验证'); }else { this.addError(`当前账号请求过多,需要通过机器人检查!第${CookieID.cookieID}个账号`); } @@ -232,6 +235,23 @@ export default class ParserReturnWorker { } } + + /** + * 添加机器人检查验证 + * */ + addCAPTCHA() { + let div = this.getByID(new Date().getTime()+'CAPTCHA','div',this.chatDiv); + + // let div = document.createElement('div'); + // document.getElementById('chat').appendChild(div); + + div.classList.add('CAPTCHAIframeDIV'); + let iframe = document.createElement('iframe'); + iframe.classList.add('CAPTCHAIframe'); + iframe.src = 'https://www.bing.com/turing/captcha/challenge'; + div.appendChild(iframe); + } + /** * 解析arguments * 解析聊天消息,将消息添加到页面