Skip to content

Commit

Permalink
修复: Opquests验证任务报错(#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
HCLonely committed Nov 30, 2024
1 parent 4469bdc commit 482af9e
Show file tree
Hide file tree
Showing 17 changed files with 67 additions and 53 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/Release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,9 @@ jobs:
uses: softprops/action-gh-release@v1
with:
prerelease: false
tag_name: v4.5.2
name: 4.5.2
body: |-
- 修复: 弹窗关闭后无法返回原标签页
- 修复: 关注/取关Steam限区游戏时动作错误
- 优化: Steam社区凭证更新逻辑
tag_name: v4.5.3
name: 4.5.3
body: '- 修复: Opquests验证任务报错(#35)'
files: |-
dist/auto-task-v4-for-giveawaysu.user.js
dist/auto-task-v4.compatibility.user.js
Expand Down
2 changes: 1 addition & 1 deletion dist/auto-task-v4-for-giveawaysu.all.user.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/auto-task-v4-for-giveawaysu.user.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 8 additions & 5 deletions dist/auto-task-v4.all.user.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ==UserScript==
// @name auto-task-v4
// @namespace auto-task-v4
// @version 4.5.2
// @version 4.5.3
// @description 自动完成 Freeanywhere,Giveawaysu,GiveeClub,Givekey,Gleam,Indiedb,keyhub,OpiumPulses,Opquests,SweepWidget 等网站的任务。
// @description:en Automatically complete the tasks of FreeAnyWhere, GiveawaySu, GiveeClub, Givekey, Gleam, Indiedb, keyhub, OpiumPulses, Opquests, SweepWidget websites.
// @author HCLonely
Expand Down Expand Up @@ -9032,12 +9032,15 @@ console.log('%c%s', 'color:blue', 'Auto-Task[Load]: 脚本开始加载');
if (opquestsVerifyTasks.length > 0) {
const taskId = opquestsVerifyTasks.pop();
GM_setValue('opquestsVerifyTasks', opquestsVerifyTasks);
$(`#task_id[value="${taskId}"]`).parent().children('button[type="submit"]')[0].click();
} else {
if (GM_getValue('opquestsVerifyTasks')) {
GM_deleteValue('opquestsVerifyTasks');
const [ verifyBtn ] = $(`#task_id[value="${taskId}"]`).parent().children('button[type="submit"]');
if (verifyBtn) {
verifyBtn.click();
return;
}
}
if (GM_getValue('opquestsVerifyTasks')) {
GM_deleteValue('opquestsVerifyTasks');
}
} catch (error) {
throwError(error, 'Opquests.before');
}
Expand Down
4 changes: 2 additions & 2 deletions dist/auto-task-v4.compatibility.all.user.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/auto-task-v4.compatibility.user.js

Large diffs are not rendered by default.

13 changes: 8 additions & 5 deletions dist/auto-task-v4.user.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ==UserScript==
// @name auto-task-v4
// @namespace auto-task-v4
// @version 4.5.2
// @version 4.5.3
// @description 自动完成 Freeanywhere,Giveawaysu,GiveeClub,Givekey,Gleam,Indiedb,keyhub,OpiumPulses,Opquests,SweepWidget 等网站的任务。
// @description:en Automatically complete the tasks of FreeAnyWhere, GiveawaySu, GiveeClub, Givekey, Gleam, Indiedb, keyhub, OpiumPulses, Opquests, SweepWidget websites.
// @author HCLonely
Expand Down Expand Up @@ -9013,12 +9013,15 @@ console.log('%c%s', 'color:blue', 'Auto-Task[Load]: 脚本开始加载');
if (opquestsVerifyTasks.length > 0) {
const taskId = opquestsVerifyTasks.pop();
GM_setValue('opquestsVerifyTasks', opquestsVerifyTasks);
$(`#task_id[value="${taskId}"]`).parent().children('button[type="submit"]')[0].click();
} else {
if (GM_getValue('opquestsVerifyTasks')) {
GM_deleteValue('opquestsVerifyTasks');
const [ verifyBtn ] = $(`#task_id[value="${taskId}"]`).parent().children('button[type="submit"]');
if (verifyBtn) {
verifyBtn.click();
return;
}
}
if (GM_getValue('opquestsVerifyTasks')) {
GM_deleteValue('opquestsVerifyTasks');
}
} catch (error) {
throwError(error, 'Opquests.before');
}
Expand Down
6 changes: 6 additions & 0 deletions doc/docs/logs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ lang: zh-CN

## V4.5

### V4.5.3

[Release](https://github.com/HCLonely/auto-task-v4/releases/tag/v4.5.3)

- 修复: Opquests验证任务报错([#35](https://github.com/HCLonely/auto-task-v4/issues/35))

### V4.5.2

[Release](https://github.com/HCLonely/auto-task-v4/releases/tag/v4.5.2)
Expand Down
6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
{
"name": "auto-task-v4",
"version": "4.5.2",
"version": "4.5.3",
"change": [
"修复: 弹窗关闭后无法返回原标签页",
"修复: 关注/取关Steam限区游戏时动作错误",
"优化: Steam社区凭证更新逻辑"
"修复: Opquests验证任务报错(#35)"
],
"description": "赠Key站自动任务脚本",
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion page/dist/auto-task-v4-for-giveawaysu.all.user.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion page/dist/auto-task-v4-for-giveawaysu.user.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 8 additions & 5 deletions page/dist/auto-task-v4.all.user.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ==UserScript==
// @name auto-task-v4
// @namespace auto-task-v4
// @version 4.5.2
// @version 4.5.3
// @description 自动完成 Freeanywhere,Giveawaysu,GiveeClub,Givekey,Gleam,Indiedb,keyhub,OpiumPulses,Opquests,SweepWidget 等网站的任务。
// @description:en Automatically complete the tasks of FreeAnyWhere, GiveawaySu, GiveeClub, Givekey, Gleam, Indiedb, keyhub, OpiumPulses, Opquests, SweepWidget websites.
// @author HCLonely
Expand Down Expand Up @@ -9032,12 +9032,15 @@ console.log('%c%s', 'color:blue', 'Auto-Task[Load]: 脚本开始加载');
if (opquestsVerifyTasks.length > 0) {
const taskId = opquestsVerifyTasks.pop();
GM_setValue('opquestsVerifyTasks', opquestsVerifyTasks);
$(`#task_id[value="${taskId}"]`).parent().children('button[type="submit"]')[0].click();
} else {
if (GM_getValue('opquestsVerifyTasks')) {
GM_deleteValue('opquestsVerifyTasks');
const [ verifyBtn ] = $(`#task_id[value="${taskId}"]`).parent().children('button[type="submit"]');
if (verifyBtn) {
verifyBtn.click();
return;
}
}
if (GM_getValue('opquestsVerifyTasks')) {
GM_deleteValue('opquestsVerifyTasks');
}
} catch (error) {
throwError(error, 'Opquests.before');
}
Expand Down
4 changes: 2 additions & 2 deletions page/dist/auto-task-v4.compatibility.all.user.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions page/dist/auto-task-v4.compatibility.user.js

Large diffs are not rendered by default.

13 changes: 8 additions & 5 deletions page/dist/auto-task-v4.user.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ==UserScript==
// @name auto-task-v4
// @namespace auto-task-v4
// @version 4.5.2
// @version 4.5.3
// @description 自动完成 Freeanywhere,Giveawaysu,GiveeClub,Givekey,Gleam,Indiedb,keyhub,OpiumPulses,Opquests,SweepWidget 等网站的任务。
// @description:en Automatically complete the tasks of FreeAnyWhere, GiveawaySu, GiveeClub, Givekey, Gleam, Indiedb, keyhub, OpiumPulses, Opquests, SweepWidget websites.
// @author HCLonely
Expand Down Expand Up @@ -9013,12 +9013,15 @@ console.log('%c%s', 'color:blue', 'Auto-Task[Load]: 脚本开始加载');
if (opquestsVerifyTasks.length > 0) {
const taskId = opquestsVerifyTasks.pop();
GM_setValue('opquestsVerifyTasks', opquestsVerifyTasks);
$(`#task_id[value="${taskId}"]`).parent().children('button[type="submit"]')[0].click();
} else {
if (GM_getValue('opquestsVerifyTasks')) {
GM_deleteValue('opquestsVerifyTasks');
const [ verifyBtn ] = $(`#task_id[value="${taskId}"]`).parent().children('button[type="submit"]');
if (verifyBtn) {
verifyBtn.click();
return;
}
}
if (GM_getValue('opquestsVerifyTasks')) {
GM_deleteValue('opquestsVerifyTasks');
}
} catch (error) {
throwError(error, 'Opquests.before');
}
Expand Down
6 changes: 2 additions & 4 deletions page/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
{
"name": "auto-task-v4",
"version": "4.5.2",
"version": "4.5.3",
"change": [
"修复: 弹窗关闭后无法返回原标签页",
"修复: 关注/取关Steam限区游戏时动作错误",
"优化: Steam社区凭证更新逻辑"
"修复: Opquests验证任务报错(#35)"
],
"description": "赠Key站自动任务脚本",
"engines": {
Expand Down
17 changes: 10 additions & 7 deletions src/scripts/website/Opquests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,20 +125,23 @@ class Opquests extends Website {
if (opquestsVerifyTasks.length > 0) {
const taskId = opquestsVerifyTasks.pop();
GM_setValue('opquestsVerifyTasks', opquestsVerifyTasks);
$(`#task_id[value="${taskId}"]`).parent()
.children('button[type="submit"]')[0].click();
} else {
if (GM_getValue<Array<string>>('opquestsVerifyTasks')) {
GM_deleteValue('opquestsVerifyTasks');
/*
const [verifyBtn] = $(`#task_id[value="${taskId}"]`).parent()
.children('button[type="submit"]');
if (verifyBtn) {
verifyBtn.click();
return;
}
}
if (GM_getValue<Array<string>>('opquestsVerifyTasks')) {
GM_deleteValue('opquestsVerifyTasks');
/*
echoLog({}).success(__('allTasksComplete'));
if (await this.getKey()) {
return;
}
window.location.reload();
return;
*/
}
}
} catch (error) {
throwError(error as Error, 'Opquests.before');
Expand Down

0 comments on commit 482af9e

Please sign in to comment.