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

Commit 1193129

Browse files
authored
Merge pull request #75 from jianjianai/dev
同步插件
2 parents 09be0fe + 68ad731 commit 1193129

File tree

3 files changed

+53
-1
lines changed

3 files changed

+53
-1
lines changed

src/main/resources/web/css/Wtite.css

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,11 +205,27 @@ body.c .ThemeColors {
205205
}
206206

207207

208-
/* 尾部分 */
208+
/*插件的验证*/
209+
.CAPTCHAIframeDIV{
210+
width: 100%;
211+
display: flex;
212+
flex-direction: column;
213+
align-items: center;
214+
margin-bottom: 2rem;
215+
}
216+
.CAPTCHAIframe{
217+
min-width: 316px;
218+
max-height: 84px;
219+
overflow: hidden;
220+
border: none;
221+
border-radius: 1rem;
222+
background-color: #ffffffc4;
223+
}
209224

210225

211226

212227

228+
/* 尾部分 */
213229
#tail-in {
214230
display: flex;
215231
width: 95%;

src/main/resources/web/css/bing.css

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,22 @@ body:has(.my) #restart {
412412
box-shadow: #00000052 0rem 0rem 0.5rem;
413413
}
414414

415+
/*插件的验证*/
416+
.CAPTCHAIframeDIV{
417+
width: 100%;
418+
display: flex;
419+
flex-direction: column;
420+
align-items: center;
421+
margin-bottom: 2rem;
422+
}
423+
.CAPTCHAIframe{
424+
min-width: 316px;
425+
max-height: 84px;
426+
overflow: hidden;
427+
border: none;
428+
border-radius: 1rem;
429+
background-color: #ffffffc4;
430+
}
415431

416432
/* 提示词 */
417433

src/main/resources/web/js/module/ChatMessage/ParserReturnWorker.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,9 @@ export default class ParserReturnWorker {
204204
this.addError(result.message);
205205
if(window.location.protocol==="chrome-extension:"){
206206
this.addError('当前账号请求过多,需要通过机器人检查!无法通过请等待24小时后再试。');
207+
this.addError('正在尝试通过验证,需要科学上网环境。');
208+
this.addCAPTCHA();
209+
this.addError('若无法通过可尝试验证码验证');
207210
}else {
208211
this.addError(`当前账号请求过多,需要通过机器人检查!第${CookieID.cookieID}个账号`);
209212
}
@@ -232,6 +235,23 @@ export default class ParserReturnWorker {
232235
}
233236

234237
}
238+
239+
/**
240+
* 添加机器人检查验证
241+
* */
242+
addCAPTCHA() {
243+
let div = this.getByID(new Date().getTime()+'CAPTCHA','div',this.chatDiv);
244+
245+
// let div = document.createElement('div');
246+
// document.getElementById('chat').appendChild(div);
247+
248+
div.classList.add('CAPTCHAIframeDIV');
249+
let iframe = document.createElement('iframe');
250+
iframe.classList.add('CAPTCHAIframe');
251+
iframe.src = 'https://www.bing.com/turing/captcha/challenge';
252+
div.appendChild(iframe);
253+
}
254+
235255
/**
236256
* 解析arguments
237257
* 解析聊天消息,将消息添加到页面

0 commit comments

Comments
 (0)