Skip to content

Commit

Permalink
优化: 未安装TimerHooker脚本时不再弹出空白页面(#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
HCLonely committed Dec 7, 2024
1 parent 482af9e commit d478a4b
Showing 17 changed files with 34 additions and 28 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/Release.yml
Original file line number Diff line number Diff line change
@@ -21,9 +21,9 @@ jobs:
uses: softprops/action-gh-release@v1
with:
prerelease: false
tag_name: v4.5.3
name: 4.5.3
body: '- 修复: Opquests验证任务报错(#35)'
tag_name: v4.5.4
name: 4.5.4
body: '- 优化: 未安装TimerHooker脚本时不再弹出空白页面(#36)'
files: |-
dist/auto-task-v4-for-giveawaysu.user.js
dist/auto-task-v4.compatibility.user.js
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.

4 changes: 2 additions & 2 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.3
// @version 4.5.4
// @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
@@ -9517,7 +9517,7 @@ console.log('%c%s', 'color:blue', 'Auto-Task[Load]: 脚本开始加载');
}
unsafeWindow.$hookTimer?.setSpeed(1e3);
const visitBtn = $task.find('.expandable').find('span:contains(more seconds),button:contains(more seconds)').filter(':visible');
if (visitBtn.length > 0) {
if (visitBtn.length > 0 && unsafeWindow.$hookTimer) {
const newTab = GM_openInTab('', {
active: true
});
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.

4 changes: 2 additions & 2 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.3
// @version 4.5.4
// @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
@@ -9498,7 +9498,7 @@ console.log('%c%s', 'color:blue', 'Auto-Task[Load]: 脚本开始加载');
}
unsafeWindow.$hookTimer?.setSpeed(1e3);
const visitBtn = $task.find('.expandable').find('span:contains(more seconds),button:contains(more seconds)').filter(':visible');
if (visitBtn.length > 0) {
if (visitBtn.length > 0 && unsafeWindow.$hookTimer) {
const newTab = GM_openInTab('', {
active: true
});
6 changes: 6 additions & 0 deletions doc/docs/logs/README.md
Original file line number Diff line number Diff line change
@@ -5,6 +5,12 @@ lang: zh-CN

## V4.5

### V4.5.4

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

- 优化: 未安装TimerHooker脚本时不再弹出空白页面([#36](https://github.com/HCLonely/auto-task-v4/issues/36))

### V4.5.3

[Release](https://github.com/HCLonely/auto-task-v4/releases/tag/v4.5.3)
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "auto-task-v4",
"version": "4.5.3",
"version": "4.5.4",
"change": [
"修复: Opquests验证任务报错(#35)"
"优化: 未安装TimerHooker脚本时不再弹出空白页面(#36)"
],
"description": "赠Key站自动任务脚本",
"engines": {
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.

4 changes: 2 additions & 2 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.3
// @version 4.5.4
// @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
@@ -9517,7 +9517,7 @@ console.log('%c%s', 'color:blue', 'Auto-Task[Load]: 脚本开始加载');
}
unsafeWindow.$hookTimer?.setSpeed(1e3);
const visitBtn = $task.find('.expandable').find('span:contains(more seconds),button:contains(more seconds)').filter(':visible');
if (visitBtn.length > 0) {
if (visitBtn.length > 0 && unsafeWindow.$hookTimer) {
const newTab = GM_openInTab('', {
active: true
});
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.

4 changes: 2 additions & 2 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.3
// @version 4.5.4
// @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
@@ -9498,7 +9498,7 @@ console.log('%c%s', 'color:blue', 'Auto-Task[Load]: 脚本开始加载');
}
unsafeWindow.$hookTimer?.setSpeed(1e3);
const visitBtn = $task.find('.expandable').find('span:contains(more seconds),button:contains(more seconds)').filter(':visible');
if (visitBtn.length > 0) {
if (visitBtn.length > 0 && unsafeWindow.$hookTimer) {
const newTab = GM_openInTab('', {
active: true
});
4 changes: 2 additions & 2 deletions page/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "auto-task-v4",
"version": "4.5.3",
"version": "4.5.4",
"change": [
"修复: Opquests验证任务报错(#35)"
"优化: 未安装TimerHooker脚本时不再弹出空白页面(#36)"
],
"description": "赠Key站自动任务脚本",
"engines": {
2 changes: 1 addition & 1 deletion src/scripts/website/Gleam.ts
Original file line number Diff line number Diff line change
@@ -454,7 +454,7 @@ class Gleam extends Website {
unsafeWindow.$hookTimer?.setSpeed(1000);
const visitBtn = $task.find('.expandable').find('span:contains(more seconds),button:contains(more seconds)')
.filter(':visible');
if (visitBtn.length > 0) {
if (visitBtn.length > 0 && unsafeWindow.$hookTimer) {
const newTab = GM_openInTab('', { active: true });
// const newTab = window.open('', '_blank');
// newTab?.focus();

0 comments on commit d478a4b

Please sign in to comment.