Skip to content

Commit a9114b5

Browse files
committed
优化:Discord人机验证提示
1 parent 48208f4 commit a9114b5

27 files changed

Lines changed: 189 additions & 35 deletions

.github/workflows/Release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ jobs:
2222
uses: softprops/action-gh-release@v1
2323
with:
2424
prerelease: false
25-
tag_name: v5.0.1
26-
name: 5.0.1
27-
body: '- 修复:部分v4链接更换'
25+
tag_name: v5.0.2
26+
name: 5.0.2
27+
body: '- 优化:Discord人机验证提示'
2828
files: |-
2929
dist/auto-task.user.js
3030
dist/auto-task.min.user.js

dist/auto-task.all.user.js

Lines changed: 11 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/auto-task.compatibility.all.user.js

Lines changed: 11 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/auto-task.compatibility.user.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// ==UserScript==
22
// @name auto-task.compatibility
33
// @namespace auto-task.compatibility
4-
// @version 5.0.1
4+
// @version 5.0.2
55
// @description 自动完成 Freeanywhere,Giveawaysu,GiveeClub,Givekey,Gleam,Indiedb,keyhub,OpiumPulses,Opquests,SweepWidget 等网站的任务。
66
// @description:en Automatically complete the tasks of FreeAnyWhere, GiveawaySu, GiveeClub, Givekey, Gleam, Indiedb, keyhub, OpiumPulses, Opquests, SweepWidget websites.
77
// @author HCLonely
@@ -69,6 +69,8 @@
6969
// @grant window.sessionStorage
7070
// @grant window.focus
7171

72+
// @connect auto-task.hclonely.com
73+
// @connect auto-task-doc.js.org
7274
// @connect cdn.jsdelivr.net
7375
// @connect store.steampowered.com
7476
// @connect steamcommunity.com
@@ -105,6 +107,7 @@
105107
// @connect itch.io
106108
// @connect auto-task.hclonely.com
107109
// @connect giveawayhopper.com
110+
// @connect freeanywhere.net
108111
// @connect *
109112

110113
// @require https://cdn.jsdelivr.net/npm/jquery@3.6.0/dist/jquery.min.js
@@ -583,6 +586,7 @@ if (missingDependencies.length > 0) {
583586
skipDiscordTask: '本次跳过Discord任务',
584587
continueAndDontRemindAgain: '总是执行Discord任务且不再提醒',
585588
gettingDiscordXContextProperties: '正在获取Discord加群参数',
589+
captchaNeeded: '检测到人机验证,请手动完成!',
586590
users: '用户',
587591
loginIns: '请先<a href="https://www.instagram.com/accounts/login/" target="_blank">登录Instagram</a>',
588592
insBanned: '您的Instagram账户已被封禁',
@@ -894,6 +898,7 @@ if (missingDependencies.length > 0) {
894898
skipDiscordTask: 'Skip Discord tasks this time.',
895899
continueAndDontRemindAgain: 'Always do Discord tasks and do not remind again.',
896900
gettingDiscordXContextProperties: 'Getting Discord X context properties...',
901+
captchaNeeded: 'Captcha detected, please complete it manually!',
897902
users: 'User',
898903
loginIns: 'Please <a href="https://www.instagram.com/accounts/login/" target="_blank">log in to Instagram</a>',
899904
insBanned: 'Your Instagram account has been banned',
@@ -2026,6 +2031,11 @@ if (missingDependencies.length > 0) {
20262031
statusText: statusText,
20272032
status: status
20282033
});
2034+
if (status === 400) {
2035+
debug('加入Discord服务器失败,状态码为400,需完成人机验证');
2036+
logStatus.error(I18n('captchaNeeded'));
2037+
return false;
2038+
}
20292039
logStatus.error(`${result}:${statusText}(${status})`);
20302040
return false;
20312041
}

dist/auto-task.min.all.user.js

Lines changed: 5 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/auto-task.min.user.js

Lines changed: 5 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/auto-task.user.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// ==UserScript==
22
// @name auto-task
33
// @namespace auto-task
4-
// @version 5.0.1
4+
// @version 5.0.2
55
// @description 自动完成 Freeanywhere,Giveawaysu,GiveeClub,Givekey,Gleam,Indiedb,keyhub,OpiumPulses,Opquests,SweepWidget 等网站的任务。
66
// @description:en Automatically complete the tasks of FreeAnyWhere, GiveawaySu, GiveeClub, Givekey, Gleam, Indiedb, keyhub, OpiumPulses, Opquests, SweepWidget websites.
77
// @author HCLonely
@@ -69,6 +69,8 @@
6969
// @grant window.sessionStorage
7070
// @grant window.focus
7171

72+
// @connect auto-task.hclonely.com
73+
// @connect auto-task-doc.js.org
7274
// @connect cdn.jsdelivr.net
7375
// @connect store.steampowered.com
7476
// @connect steamcommunity.com
@@ -105,6 +107,7 @@
105107
// @connect itch.io
106108
// @connect auto-task.hclonely.com
107109
// @connect giveawayhopper.com
110+
// @connect freeanywhere.net
108111
// @connect *
109112

110113
// @require https://cdn.jsdelivr.net/npm/jquery@3.6.0/dist/jquery.min.js
@@ -577,6 +580,7 @@ if (missingDependencies.length > 0) {
577580
skipDiscordTask: '本次跳过Discord任务',
578581
continueAndDontRemindAgain: '总是执行Discord任务且不再提醒',
579582
gettingDiscordXContextProperties: '正在获取Discord加群参数',
583+
captchaNeeded: '检测到人机验证,请手动完成!',
580584
users: '用户',
581585
loginIns: '请先<a href="https://www.instagram.com/accounts/login/" target="_blank">登录Instagram</a>',
582586
insBanned: '您的Instagram账户已被封禁',
@@ -888,6 +892,7 @@ if (missingDependencies.length > 0) {
888892
skipDiscordTask: 'Skip Discord tasks this time.',
889893
continueAndDontRemindAgain: 'Always do Discord tasks and do not remind again.',
890894
gettingDiscordXContextProperties: 'Getting Discord X context properties...',
895+
captchaNeeded: 'Captcha detected, please complete it manually!',
891896
users: 'User',
892897
loginIns: 'Please <a href="https://www.instagram.com/accounts/login/" target="_blank">log in to Instagram</a>',
893898
insBanned: 'Your Instagram account has been banned',
@@ -1983,6 +1988,11 @@ if (missingDependencies.length > 0) {
19831988
statusText: statusText,
19841989
status: status
19851990
});
1991+
if (status === 400) {
1992+
debug('加入Discord服务器失败,状态码为400,需完成人机验证');
1993+
logStatus.error(I18n('captchaNeeded'));
1994+
return false;
1995+
}
19861996
logStatus.error(`${result}:${statusText}(${status})`);
19871997
return false;
19881998
}

doc/docs/.vuepress/public/dist/auto-task.all.user.js

Lines changed: 11 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

doc/docs/.vuepress/public/dist/auto-task.compatibility.all.user.js

Lines changed: 11 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

doc/docs/.vuepress/public/dist/auto-task.compatibility.user.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// ==UserScript==
22
// @name auto-task.compatibility
33
// @namespace auto-task.compatibility
4-
// @version 5.0.1
4+
// @version 5.0.2
55
// @description 自动完成 Freeanywhere,Giveawaysu,GiveeClub,Givekey,Gleam,Indiedb,keyhub,OpiumPulses,Opquests,SweepWidget 等网站的任务。
66
// @description:en Automatically complete the tasks of FreeAnyWhere, GiveawaySu, GiveeClub, Givekey, Gleam, Indiedb, keyhub, OpiumPulses, Opquests, SweepWidget websites.
77
// @author HCLonely
@@ -69,6 +69,8 @@
6969
// @grant window.sessionStorage
7070
// @grant window.focus
7171

72+
// @connect auto-task.hclonely.com
73+
// @connect auto-task-doc.js.org
7274
// @connect cdn.jsdelivr.net
7375
// @connect store.steampowered.com
7476
// @connect steamcommunity.com
@@ -105,6 +107,7 @@
105107
// @connect itch.io
106108
// @connect auto-task.hclonely.com
107109
// @connect giveawayhopper.com
110+
// @connect freeanywhere.net
108111
// @connect *
109112

110113
// @require https://cdn.jsdelivr.net/npm/jquery@3.6.0/dist/jquery.min.js
@@ -583,6 +586,7 @@ if (missingDependencies.length > 0) {
583586
skipDiscordTask: '本次跳过Discord任务',
584587
continueAndDontRemindAgain: '总是执行Discord任务且不再提醒',
585588
gettingDiscordXContextProperties: '正在获取Discord加群参数',
589+
captchaNeeded: '检测到人机验证,请手动完成!',
586590
users: '用户',
587591
loginIns: '请先<a href="https://www.instagram.com/accounts/login/" target="_blank">登录Instagram</a>',
588592
insBanned: '您的Instagram账户已被封禁',
@@ -894,6 +898,7 @@ if (missingDependencies.length > 0) {
894898
skipDiscordTask: 'Skip Discord tasks this time.',
895899
continueAndDontRemindAgain: 'Always do Discord tasks and do not remind again.',
896900
gettingDiscordXContextProperties: 'Getting Discord X context properties...',
901+
captchaNeeded: 'Captcha detected, please complete it manually!',
897902
users: 'User',
898903
loginIns: 'Please <a href="https://www.instagram.com/accounts/login/" target="_blank">log in to Instagram</a>',
899904
insBanned: 'Your Instagram account has been banned',
@@ -2026,6 +2031,11 @@ if (missingDependencies.length > 0) {
20262031
statusText: statusText,
20272032
status: status
20282033
});
2034+
if (status === 400) {
2035+
debug('加入Discord服务器失败,状态码为400,需完成人机验证');
2036+
logStatus.error(I18n('captchaNeeded'));
2037+
return false;
2038+
}
20292039
logStatus.error(`${result}:${statusText}(${status})`);
20302040
return false;
20312041
}

0 commit comments

Comments
 (0)