Skip to content

Commit

Permalink
修复:部分文本错误(#31);
Browse files Browse the repository at this point in the history
修复:Gleam无法完成弹窗计时任务(#32)
  • Loading branch information
HCLonely committed Nov 2, 2024
1 parent 4aa0f28 commit 3b0c204
Show file tree
Hide file tree
Showing 20 changed files with 150 additions and 53 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@
"max-len": [
"error",
{
"code": 150
"code": 200
}
],
"block-spacing": "error",
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/Release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@ jobs:
uses: softprops/action-gh-release@v1
with:
prerelease: false
tag_name: v4.4.12
name: 4.4.12
body: '- 修复:Steam社区凭证更新错误(#26)'
tag_name: v4.4.13
name: 4.4.13
body: |-
- 修复:部分文本错误(#31)
- 修复:Gleam无法完成弹窗计时任务(#32)
files: |-
dist/auto-task-v4-for-giveawaysu.user.js
dist/auto-task-v4.compatibility.user.js
Expand Down
4 changes: 2 additions & 2 deletions dist/auto-task-v4-for-giveawaysu.all.user.js

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

24 changes: 20 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.12
// @version 4.4.13
// @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 @@ -1239,8 +1239,8 @@ console.log('%c%s', 'color:blue', 'Auto-Task[Load]: 脚本开始加载');
skipTaskOption: '设置中已配置跳过任务',
other: '其他',
globalOptions: '全局设置',
checkLogin: '登录检测</br>需要登录的网站自动登录,部分本网站支持',
checkLeftKey: '剩余Key检测</br>赠Key活动结束提示是否关闭,部分本网站支持',
checkLogin: '登录检测</br>需要登录的网站自动登录,部分网站支持',
checkLeftKey: '剩余Key检测</br>赠Key活动结束提示是否关闭,部分网站支持',
twitterVerifyId: '通过尝试关注该账号验证Twitter凭证</br>默认为Twitter官方帐号 783214</br>不想关注官方账号可以改为自己的帐号',
youtubeVerifyChannel: '通过尝试订阅该频道验证YouTube凭证</br>默认为YouTube官方频道 UCrXUsMBcfTVqwAS7DKg9C0Q</br>不想关注官方频道可以改为自己的频道',
autoUpdateSource: '更新源</br>github: 需代理,实时更新</br>jsdelivr: 可不用代理,更新有延迟</br>standby: 备用</br>auto: 依次使用github, jsdelivr, standby源进行尝试更新',
Expand Down Expand Up @@ -9513,11 +9513,27 @@ console.log('%c%s', 'color:blue', 'Auto-Task[Load]: 脚本开始加载');
}
const taskInfo = $task.find('.user-links');
taskInfo[0].click();
const aElements = $task.find('.expandable').find('a.btn');
if (aElements.length > 0) {
for (const element of aElements) {
const $element = $(element);
const href = $element.attr('href');
$element.removeAttr('href')[0].click();
$element.attr('href', href);
}
}
unsafeWindow.$hookTimer?.setSpeed(1e3);
const visitBtn = $task.find('.expandable').find('span:contains(more seconds),button:contains(more seconds)').filter(':visible');
if (visitBtn.length > 0) {
const newTab = window.open('', '_blank');
newTab?.focus();
await delay(1e3);
newTab?.close();
}
await delay(3e3);
unsafeWindow.$hookTimer?.setSpeed(1);
const expandInfo = $task.find('.expandable');
const input = expandInfo.find('input')[0];
const [ input ] = expandInfo.find('input');
if (input) {
const evt = new Event('input', {
bubbles: true,
Expand Down
6 changes: 3 additions & 3 deletions dist/auto-task-v4.compatibility.all.user.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/auto-task-v4.compatibility.user.js

Large diffs are not rendered by default.

24 changes: 20 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.12
// @version 4.4.13
// @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 @@ -1220,8 +1220,8 @@ console.log('%c%s', 'color:blue', 'Auto-Task[Load]: 脚本开始加载');
skipTaskOption: '设置中已配置跳过任务',
other: '其他',
globalOptions: '全局设置',
checkLogin: '登录检测</br>需要登录的网站自动登录,部分本网站支持',
checkLeftKey: '剩余Key检测</br>赠Key活动结束提示是否关闭,部分本网站支持',
checkLogin: '登录检测</br>需要登录的网站自动登录,部分网站支持',
checkLeftKey: '剩余Key检测</br>赠Key活动结束提示是否关闭,部分网站支持',
twitterVerifyId: '通过尝试关注该账号验证Twitter凭证</br>默认为Twitter官方帐号 783214</br>不想关注官方账号可以改为自己的帐号',
youtubeVerifyChannel: '通过尝试订阅该频道验证YouTube凭证</br>默认为YouTube官方频道 UCrXUsMBcfTVqwAS7DKg9C0Q</br>不想关注官方频道可以改为自己的频道',
autoUpdateSource: '更新源</br>github: 需代理,实时更新</br>jsdelivr: 可不用代理,更新有延迟</br>standby: 备用</br>auto: 依次使用github, jsdelivr, standby源进行尝试更新',
Expand Down Expand Up @@ -9494,11 +9494,27 @@ console.log('%c%s', 'color:blue', 'Auto-Task[Load]: 脚本开始加载');
}
const taskInfo = $task.find('.user-links');
taskInfo[0].click();
const aElements = $task.find('.expandable').find('a.btn');
if (aElements.length > 0) {
for (const element of aElements) {
const $element = $(element);
const href = $element.attr('href');
$element.removeAttr('href')[0].click();
$element.attr('href', href);
}
}
unsafeWindow.$hookTimer?.setSpeed(1e3);
const visitBtn = $task.find('.expandable').find('span:contains(more seconds),button:contains(more seconds)').filter(':visible');
if (visitBtn.length > 0) {
const newTab = window.open('', '_blank');
newTab?.focus();
await delay(1e3);
newTab?.close();
}
await delay(3e3);
unsafeWindow.$hookTimer?.setSpeed(1);
const expandInfo = $task.find('.expandable');
const input = expandInfo.find('input')[0];
const [ input ] = expandInfo.find('input');
if (input) {
const evt = new Event('input', {
bubbles: true,
Expand Down
11 changes: 6 additions & 5 deletions doc/docs/.vuepress/public/report.html

Large diffs are not rendered by default.

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.13

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

- 修复:部分文本错误([#31](https://github.com/HCLonely/auto-task-v4/issues/31))
- 修复:Gleam无法完成弹窗计时任务([#32](https://github.com/HCLonely/auto-task-v4/issues/32))

### V4.4.12

[Release](https://github.com/HCLonely/auto-task-v4/releases/tag/v4.4.12)
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"name": "auto-task-v4",
"version": "4.4.12",
"version": "4.4.13",
"change": [
"修复:Steam社区凭证更新错误(#26)"
"修复:部分文本错误(#31)",
"修复:Gleam无法完成弹窗计时任务(#32)"
],
"description": "赠Key站自动任务脚本",
"main": "package.json",
Expand Down
4 changes: 2 additions & 2 deletions page/dist/auto-task-v4-for-giveawaysu.all.user.js

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

24 changes: 20 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.12
// @version 4.4.13
// @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 @@ -1239,8 +1239,8 @@ console.log('%c%s', 'color:blue', 'Auto-Task[Load]: 脚本开始加载');
skipTaskOption: '设置中已配置跳过任务',
other: '其他',
globalOptions: '全局设置',
checkLogin: '登录检测</br>需要登录的网站自动登录,部分本网站支持',
checkLeftKey: '剩余Key检测</br>赠Key活动结束提示是否关闭,部分本网站支持',
checkLogin: '登录检测</br>需要登录的网站自动登录,部分网站支持',
checkLeftKey: '剩余Key检测</br>赠Key活动结束提示是否关闭,部分网站支持',
twitterVerifyId: '通过尝试关注该账号验证Twitter凭证</br>默认为Twitter官方帐号 783214</br>不想关注官方账号可以改为自己的帐号',
youtubeVerifyChannel: '通过尝试订阅该频道验证YouTube凭证</br>默认为YouTube官方频道 UCrXUsMBcfTVqwAS7DKg9C0Q</br>不想关注官方频道可以改为自己的频道',
autoUpdateSource: '更新源</br>github: 需代理,实时更新</br>jsdelivr: 可不用代理,更新有延迟</br>standby: 备用</br>auto: 依次使用github, jsdelivr, standby源进行尝试更新',
Expand Down Expand Up @@ -9513,11 +9513,27 @@ console.log('%c%s', 'color:blue', 'Auto-Task[Load]: 脚本开始加载');
}
const taskInfo = $task.find('.user-links');
taskInfo[0].click();
const aElements = $task.find('.expandable').find('a.btn');
if (aElements.length > 0) {
for (const element of aElements) {
const $element = $(element);
const href = $element.attr('href');
$element.removeAttr('href')[0].click();
$element.attr('href', href);
}
}
unsafeWindow.$hookTimer?.setSpeed(1e3);
const visitBtn = $task.find('.expandable').find('span:contains(more seconds),button:contains(more seconds)').filter(':visible');
if (visitBtn.length > 0) {
const newTab = window.open('', '_blank');
newTab?.focus();
await delay(1e3);
newTab?.close();
}
await delay(3e3);
unsafeWindow.$hookTimer?.setSpeed(1);
const expandInfo = $task.find('.expandable');
const input = expandInfo.find('input')[0];
const [ input ] = expandInfo.find('input');
if (input) {
const evt = new Event('input', {
bubbles: true,
Expand Down
6 changes: 3 additions & 3 deletions page/dist/auto-task-v4.compatibility.all.user.js

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

24 changes: 20 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.12
// @version 4.4.13
// @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 @@ -1220,8 +1220,8 @@ console.log('%c%s', 'color:blue', 'Auto-Task[Load]: 脚本开始加载');
skipTaskOption: '设置中已配置跳过任务',
other: '其他',
globalOptions: '全局设置',
checkLogin: '登录检测</br>需要登录的网站自动登录,部分本网站支持',
checkLeftKey: '剩余Key检测</br>赠Key活动结束提示是否关闭,部分本网站支持',
checkLogin: '登录检测</br>需要登录的网站自动登录,部分网站支持',
checkLeftKey: '剩余Key检测</br>赠Key活动结束提示是否关闭,部分网站支持',
twitterVerifyId: '通过尝试关注该账号验证Twitter凭证</br>默认为Twitter官方帐号 783214</br>不想关注官方账号可以改为自己的帐号',
youtubeVerifyChannel: '通过尝试订阅该频道验证YouTube凭证</br>默认为YouTube官方频道 UCrXUsMBcfTVqwAS7DKg9C0Q</br>不想关注官方频道可以改为自己的频道',
autoUpdateSource: '更新源</br>github: 需代理,实时更新</br>jsdelivr: 可不用代理,更新有延迟</br>standby: 备用</br>auto: 依次使用github, jsdelivr, standby源进行尝试更新',
Expand Down Expand Up @@ -9494,11 +9494,27 @@ console.log('%c%s', 'color:blue', 'Auto-Task[Load]: 脚本开始加载');
}
const taskInfo = $task.find('.user-links');
taskInfo[0].click();
const aElements = $task.find('.expandable').find('a.btn');
if (aElements.length > 0) {
for (const element of aElements) {
const $element = $(element);
const href = $element.attr('href');
$element.removeAttr('href')[0].click();
$element.attr('href', href);
}
}
unsafeWindow.$hookTimer?.setSpeed(1e3);
const visitBtn = $task.find('.expandable').find('span:contains(more seconds),button:contains(more seconds)').filter(':visible');
if (visitBtn.length > 0) {
const newTab = window.open('', '_blank');
newTab?.focus();
await delay(1e3);
newTab?.close();
}
await delay(3e3);
unsafeWindow.$hookTimer?.setSpeed(1);
const expandInfo = $task.find('.expandable');
const input = expandInfo.find('input')[0];
const [ input ] = expandInfo.find('input');
if (input) {
const evt = new Event('input', {
bubbles: true,
Expand Down
5 changes: 3 additions & 2 deletions page/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"name": "auto-task-v4",
"version": "4.4.12",
"version": "4.4.13",
"change": [
"修复:Steam社区凭证更新错误(#26)"
"修复:部分文本错误(#31)",
"修复:Gleam无法完成弹窗计时任务(#32)"
],
"description": "赠Key站自动任务脚本",
"main": "package.json",
Expand Down
4 changes: 2 additions & 2 deletions src/locales/zh-CN.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ const data = {
skipTaskOption: '设置中已配置跳过任务',
other: '其他',
globalOptions: '全局设置',
checkLogin: '登录检测</br>需要登录的网站自动登录,部分本网站支持',
checkLeftKey: '剩余Key检测</br>赠Key活动结束提示是否关闭,部分本网站支持',
checkLogin: '登录检测</br>需要登录的网站自动登录,部分网站支持',
checkLeftKey: '剩余Key检测</br>赠Key活动结束提示是否关闭,部分网站支持',
twitterVerifyId: '通过尝试关注该账号验证Twitter凭证</br>默认为Twitter官方帐号 783214</br>不想关注官方账号可以改为自己的帐号',
youtubeVerifyChannel: '通过尝试订阅该频道验证YouTube凭证</br>默认为YouTube官方频道 UCrXUsMBcfTVqwAS7DKg9C0Q</br>不想关注官方频道可以改为自己的频道',
autoUpdateSource: '更新源</br>github: 需代理,实时更新</br>jsdelivr: 可不用代理,更新有延迟</br>standby: 备用</br>auto: 依次使用github, jsdelivr, standby源进行尝试更新',
Expand Down
25 changes: 23 additions & 2 deletions src/scripts/website/Gleam.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* @Description : https://gleam.io
*/

/* eslint-disable @typescript-eslint/no-empty-function */
// eslint-disable-next-line
/// <reference path = "Gleam.d.ts" />

Expand Down Expand Up @@ -279,14 +280,34 @@ class Gleam extends Website {

const taskInfo = $task.find('.user-links');
taskInfo[0].click();
// const clickBtn = .find('span:contains(Continue),button:contains(Continue)') Click Here

const aElements = $task.find('.expandable').find('a.btn');
if (aElements.length > 0) {
for (const element of aElements) {
const $element = $(element);
const href = $element.attr('href');
$element.removeAttr('href')[0].click();
$element.attr('href', href as string);
}
}

unsafeWindow.$hookTimer?.setSpeed(1000);
const visitBtn = $task.find('.expandable').find('span:contains(more seconds),button:contains(more seconds)')
.filter(':visible');
if (visitBtn.length > 0) {
const newTab = window.open('', '_blank');
newTab?.focus();
await delay(1000);
newTab?.close();
}
await delay(3000);
unsafeWindow.$hookTimer?.setSpeed(1);

const expandInfo = $task.find('.expandable');
const input = expandInfo.find('input')[0];
const [input] = expandInfo.find('input');
if (input) {
const evt = new Event("input", { bubbles: true, cancelable: true, composed: true });
const evt = new Event('input', { bubbles: true, cancelable: true, composed: true });
const valuelimit = [...expandInfo.text().matchAll(/"(.+?)"/g)].at(-1)?.[1];
input.value = valuelimit || 'vloot';
// expandInfo.find('input').val(this.options.vlootUsername);
Expand Down

0 comments on commit 3b0c204

Please sign in to comment.