Skip to content
This repository has been archived by the owner on Nov 8, 2023. It is now read-only.

Commit

Permalink
Merge pull request #75 from jianjianai/dev
Browse files Browse the repository at this point in the history
同步插件
  • Loading branch information
jianjianai authored May 27, 2023
2 parents 09be0fe + 68ad731 commit 1193129
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 1 deletion.
18 changes: 17 additions & 1 deletion src/main/resources/web/css/Wtite.css
Original file line number Diff line number Diff line change
Expand Up @@ -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%;
Expand Down
16 changes: 16 additions & 0 deletions src/main/resources/web/css/bing.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/* 提示词 */

Expand Down
20 changes: 20 additions & 0 deletions src/main/resources/web/js/module/ChatMessage/ParserReturnWorker.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}个账号`);
}
Expand Down Expand Up @@ -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
* 解析聊天消息,将消息添加到页面
Expand Down

0 comments on commit 1193129

Please sign in to comment.