Skip to content

Commit

Permalink
重要:4.4.0以后版本*需TamperMonkey >= 5.2.0或TamperMonkey >= 5.2.6196);
Browse files Browse the repository at this point in the history
重要:暂时取消对Violentmonkey的支持(#20);
修复:OpiumPulses网站加入抽奖状态获取错误(#21);
文档:更新部分说明文档.
  • Loading branch information
HCLonely committed Jun 9, 2024
1 parent 50d9fdb commit 346de4a
Show file tree
Hide file tree
Showing 21 changed files with 108 additions and 55 deletions.
18 changes: 7 additions & 11 deletions .github/workflows/Release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,13 @@ jobs:
uses: softprops/action-gh-release@v1
with:
prerelease: false
tag_name: v4.4.0
name: 4.4.0
body: >-
- 修复:Twitter/X域名更改导致部分功能不可用(#18)
- 修复:配置跳过Discord任务时无效(#19)
- 优化:Twitter/X凭证获取方式(*需TamperMonkey >= 5.2.0或TamperMonkey >=
5.2.6196)
- 优化:Youtube凭证获取方式(*需TamperMonkey >= 5.2.0或TamperMonkey >= 5.2.6196)
tag_name: v4.4.1
name: 4.4.1
body: |-
- 重要:4.4.0以后版本*需TamperMonkey >= 5.2.0或TamperMonkey >= 5.2.6196)
- 重要:暂时取消对Violentmonkey的支持(#20)
- 修复:OpiumPulses网站加入抽奖状态获取错误(#21)
- 文档:更新部分说明文档
files: |-
dist/auto-task-v4-for-giveawaysu.user.js
dist/auto-task-v4.compatibility.user.js
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
- [x] 添加更新源
- [x] 添加更新日志
- [x] 添加 giveaway.su 专版
- [ ] TM版本检查

## 感谢以下开源项目

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.

19 changes: 15 additions & 4 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.4.0
// @version 4.4.1
// @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 @@ -8517,14 +8517,25 @@ console.log('%c%s', 'color:blue', 'Auto-Task[Load]: 脚本开始加载');
method: 'GET'
});
if (result === 'Success') {
if (data?.responseText && /You've entered this giveaway/gim.test(data.responseText)) {
const {
result: result0,
statusText: statusText0,
status: status0,
data: data0
} = await tools_httpRequest({
url: data?.finalUrl,
method: 'GET'
});
if (data0?.responseText && /You've entered this giveaway/gim.test(data0.responseText)) {
logStatus.success();
const points = data.responseText.match(/Points:[\s]*?([\d]+)/)?.[1];
const points = data0.responseText.match(/Points:[\s]*?([\d]+)/)?.[1];
if (type === 'points' && points) {
this.myPoints = parseInt(points, 10);
}
} else if (data0?.responseText && /You're not eligible to enter/gim.test(data0.responseText)) {
logStatus.error('You\'re not eligible to enter');
} else {
logStatus.error(`Error:${data?.statusText}(${data?.status})`);
logStatus.error(`${result0}:${statusText0}(${status0})`);
}
} else {
logStatus.error(`${result}:${statusText}(${status})`);
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.

19 changes: 15 additions & 4 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.4.0
// @version 4.4.1
// @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 @@ -8498,14 +8498,25 @@ console.log('%c%s', 'color:blue', 'Auto-Task[Load]: 脚本开始加载');
method: 'GET'
});
if (result === 'Success') {
if (data?.responseText && /You've entered this giveaway/gim.test(data.responseText)) {
const {
result: result0,
statusText: statusText0,
status: status0,
data: data0
} = await tools_httpRequest({
url: data?.finalUrl,
method: 'GET'
});
if (data0?.responseText && /You've entered this giveaway/gim.test(data0.responseText)) {
logStatus.success();
const points = data.responseText.match(/Points:[\s]*?([\d]+)/)?.[1];
const points = data0.responseText.match(/Points:[\s]*?([\d]+)/)?.[1];
if (type === 'points' && points) {
this.myPoints = parseInt(points, 10);
}
} else if (data0?.responseText && /You're not eligible to enter/gim.test(data0.responseText)) {
logStatus.error('You\'re not eligible to enter');
} else {
logStatus.error(`Error:${data?.statusText}(${data?.status})`);
logStatus.error(`${result0}:${statusText0}(${status0})`);
}
} else {
logStatus.error(`${result}:${statusText}(${status})`);
Expand Down
2 changes: 1 addition & 1 deletion doc/docs/en/guide/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ The content of this page is translated through Google translation. If the descri

## READ ME FIRST

1. This script supports [Tampermonkey](https://www.tampermonkey.net/) and [Violentmonkey](https://violentmonkey.github.io/) extensions, not other extensions specifically;
1. This script supports [Tampermonkey](https://www.tampermonkey.net/) >= 5.2.0 ~~and [Violentmonkey](https://violentmonkey.github.io/)~~ extensions, not other extensions specifically;
2. Reddit related functions need to use the beta version of reddit website to use, if the script fails to switch automatically, please switch by yourself;
3. When verifying Twitter and Youtube token, it will automatically follow the official account. If you don’t want to follow the official account, you can go to [Settings Page](https://auto-task-v4.hclonely.com/setting.html)->`Global Settings`->`Others` to change;
4. The functions of `Like community announcement` and `Like workshop item` do not support cancellation, and the `Opquests` website does not support cancellation tasks;
Expand Down
2 changes: 1 addition & 1 deletion doc/docs/guide/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ lang: zh-CN

## 用前必读

1. 此脚本支持[Tampermonkey](https://www.tampermonkey.net/)[Violentmonkey](https://violentmonkey.github.io/)扩展,不会专门去兼容其他扩展;
1. 此脚本支持[Tampermonkey](https://www.tampermonkey.net/) >= 5.2.0 ~~[Violentmonkey](https://violentmonkey.github.io/)~~ 扩展,不会专门去兼容其他扩展;
2. reddit功能需要使用reddit的beta版网站才能使用,如果脚本自动切换失败,请自行切换;
3. 验证 Twitter 和 Youtube 凭证时会自动关注官方账号,如果不想关注官方账号,可在[设置页面](https://auto-task-v4.hclonely.com/setting.html)->`全局设置`->`其他`中更换;
4. `点赞社区公告``点赞创意工坊物品`功能不支持撤销,`Opquests`网站不支持撤销任务;
Expand Down
7 changes: 7 additions & 0 deletions doc/docs/logs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ lang: zh-CN

## V4.4

### V4.4.1

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

- 重要:4.4.0以后版本*需TamperMonkey >= 5.2.0或TamperMonkey >= 5.2.6196)
- 重要:暂时取消对Violentmonkey的支持

### V4.4.0

[Release](https://github.com/HCLonely/auto-task-v4/releases/tag/v4.4.0)
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "auto-task-v4",
"version": "4.4.0",
"version": "4.4.1",
"change": [
"修复:Twitter/X域名更改导致部分功能不可用(#18)",
"修复:配置跳过Discord任务时无效(#19)",
"优化:Twitter/X凭证获取方式(*需TamperMonkey >= 5.2.0或TamperMonkey >= 5.2.6196)",
"优化:Youtube凭证获取方式(*需TamperMonkey >= 5.2.0或TamperMonkey >= 5.2.6196)"
"重要:4.4.0以后版本*需TamperMonkey >= 5.2.0或TamperMonkey >= 5.2.6196)",
"重要:暂时取消对Violentmonkey的支持(#20)",
"修复:OpiumPulses网站加入抽奖状态获取错误(#21)",
"文档:更新部分说明文档"
],
"description": "赠Key站自动任务脚本",
"main": "package.json",
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.

19 changes: 15 additions & 4 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.4.0
// @version 4.4.1
// @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 @@ -8517,14 +8517,25 @@ console.log('%c%s', 'color:blue', 'Auto-Task[Load]: 脚本开始加载');
method: 'GET'
});
if (result === 'Success') {
if (data?.responseText && /You've entered this giveaway/gim.test(data.responseText)) {
const {
result: result0,
statusText: statusText0,
status: status0,
data: data0
} = await tools_httpRequest({
url: data?.finalUrl,
method: 'GET'
});
if (data0?.responseText && /You've entered this giveaway/gim.test(data0.responseText)) {
logStatus.success();
const points = data.responseText.match(/Points:[\s]*?([\d]+)/)?.[1];
const points = data0.responseText.match(/Points:[\s]*?([\d]+)/)?.[1];
if (type === 'points' && points) {
this.myPoints = parseInt(points, 10);
}
} else if (data0?.responseText && /You're not eligible to enter/gim.test(data0.responseText)) {
logStatus.error('You\'re not eligible to enter');
} else {
logStatus.error(`Error:${data?.statusText}(${data?.status})`);
logStatus.error(`${result0}:${statusText0}(${status0})`);
}
} else {
logStatus.error(`${result}:${statusText}(${status})`);
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.

19 changes: 15 additions & 4 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.4.0
// @version 4.4.1
// @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 @@ -8498,14 +8498,25 @@ console.log('%c%s', 'color:blue', 'Auto-Task[Load]: 脚本开始加载');
method: 'GET'
});
if (result === 'Success') {
if (data?.responseText && /You've entered this giveaway/gim.test(data.responseText)) {
const {
result: result0,
statusText: statusText0,
status: status0,
data: data0
} = await tools_httpRequest({
url: data?.finalUrl,
method: 'GET'
});
if (data0?.responseText && /You've entered this giveaway/gim.test(data0.responseText)) {
logStatus.success();
const points = data.responseText.match(/Points:[\s]*?([\d]+)/)?.[1];
const points = data0.responseText.match(/Points:[\s]*?([\d]+)/)?.[1];
if (type === 'points' && points) {
this.myPoints = parseInt(points, 10);
}
} else if (data0?.responseText && /You're not eligible to enter/gim.test(data0.responseText)) {
logStatus.error('You\'re not eligible to enter');
} else {
logStatus.error(`Error:${data?.statusText}(${data?.status})`);
logStatus.error(`${result0}:${statusText0}(${status0})`);
}
} else {
logStatus.error(`${result}:${statusText}(${status})`);
Expand Down
10 changes: 5 additions & 5 deletions page/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "auto-task-v4",
"version": "4.4.0",
"version": "4.4.1",
"change": [
"修复:Twitter/X域名更改导致部分功能不可用(#18)",
"修复:配置跳过Discord任务时无效(#19)",
"优化:Twitter/X凭证获取方式(*需TamperMonkey >= 5.2.0或TamperMonkey >= 5.2.6196)",
"优化:Youtube凭证获取方式(*需TamperMonkey >= 5.2.0或TamperMonkey >= 5.2.6196)"
"重要:4.4.0以后版本*需TamperMonkey >= 5.2.0或TamperMonkey >= 5.2.6196)",
"重要:暂时取消对Violentmonkey的支持(#20)",
"修复:OpiumPulses网站加入抽奖状态获取错误(#21)",
"文档:更新部分说明文档"
],
"description": "赠Key站自动任务脚本",
"main": "package.json",
Expand Down
1 change: 1 addition & 0 deletions src/global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ declare global {
fetch?: boolean
username?: string
password?: string
redirect?: 'follow'|'error'|'manual'
}
interface MonkeyXhrDetails extends MonkeyXhrBasicDetails {
onabort?: (response: MonkeyXhrResponse) => void
Expand Down
12 changes: 9 additions & 3 deletions src/scripts/website/OpiumPulses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,20 @@ class OpiumPulses {
method: 'GET'
});
if (result === 'Success') {
if (data?.responseText && /You've entered this giveaway/gim.test(data.responseText)) {
const { result: result0, statusText: statusText0, status: status0, data: data0 } = await httpRequest({
url: data?.finalUrl as string,
method: 'GET'
});
if (data0?.responseText && /You've entered this giveaway/gim.test(data0.responseText)) {
logStatus.success();
const points = data.responseText.match(/Points:[\s]*?([\d]+)/)?.[1];
const points = data0.responseText.match(/Points:[\s]*?([\d]+)/)?.[1];
if (type === 'points' && points) {
this.myPoints = parseInt(points, 10);
}
} else if (data0?.responseText && /You're not eligible to enter/gim.test(data0.responseText)) {
logStatus.error('You\'re not eligible to enter');
} else {
logStatus.error(`Error:${data?.statusText}(${data?.status})`);
logStatus.error(`${result0}:${statusText0}(${status0})`);
}
} else {
logStatus.error(`${result}:${statusText}(${status})`);
Expand Down

0 comments on commit 346de4a

Please sign in to comment.