Skip to content

Commit

Permalink
Givee任务识别优化;Givee可识别任务增加
Browse files Browse the repository at this point in the history
  • Loading branch information
HCLonely committed Jul 3, 2022
1 parent aa81c53 commit d61da84
Show file tree
Hide file tree
Showing 18 changed files with 124 additions and 93 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/Release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@ jobs:
uses: softprops/action-gh-release@v1
with:
prerelease: false
tag_name: v4.2.15
name: 4.2.15
body: '- Gleam可识别任务增加(Follow *** on TikTok!)'
tag_name: v4.2.16
name: 4.2.16
body: |-
- Givee任务识别优化
- Givee可识别任务增加(关注Steam游戏)
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.

12 changes: 8 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.2.15
// @version 4.2.16
// @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 @@ -8451,24 +8451,28 @@ console.log('%c%s', 'color:blue', 'Auto-Task[Load]: 脚本开始加载');
const tasks = $('.event-actions tr');
for (const task of tasks) {
pro.push(new Promise(resolve => {
var _$$find;
const taskDes = $(task).find('.event-action-label a');
const taskIcon = $(task).find('.event-action-icon i').attr('class') || '';
const taskName = taskDes.text().trim();
const taskType = (_$$find = $(task).find('button[data-type]')) === null || _$$find === void 0 ? void 0 : _$$find.attr('data-type');
if (taskIcon.includes('ban') || /AdBlock/i.test(taskName) || taskIcon.includes('envelope')) {
return resolve(true);
}
getRedirectLink(taskDes.attr('href')).then(taskLink => {
if (!taskLink) {
return resolve(false);
}
if (/^https?:\/\/steamcommunity\.com\/groups/.test(taskLink)) {
if (taskType === 'steam.group.join' && /'^https?:\/\/steamcommunity\.com\/groups'/.test(taskLink)) {
this.undoneTasks.steam.groupLinks.push(taskLink);
} else if (/like.*announcement/gi.test(taskName)) {
this.undoneTasks.steam.announcementLinks.push(taskLink);
} else if (taskIcon.includes('plus') && /^https?:\/\/store\.steampowered\.com\/app\//.test(taskLink)) {
} else if (taskType === 'steam.game.wishlist' && /^https?:\/\/store\.steampowered\.com\/app\//.test(taskLink)) {
this.undoneTasks.steam.wishlistLinks.push(taskLink);
} else if (taskIcon.includes('plus') && taskDes.attr('data-steam-wishlist-appid')) {
} else if (taskType === 'steam.game.wishlist' && taskDes.attr('data-steam-wishlist-appid')) {
this.undoneTasks.steam.wishlistLinks.push(`https://store.steampowered.com/app/${taskDes.attr('data-steam-wishlist-appid')}`);
} else if (taskType === 'steam.game.follow' && /^https?:\/\/store\.steampowered\.com\/app\//.test(taskLink)) {
this.undoneTasks.steam.followLinks.push(taskLink);
} else if (/^https?:\/\/store\.steampowered\.com\/curator\//.test(taskLink)) {
this.undoneTasks.steam.curatorLinks.push(taskLink);
} else if (taskIcon.includes('steam') && /follow|subscribe/gim.test(taskName)) {
Expand Down
30 changes: 15 additions & 15 deletions dist/auto-task-v4.compatibility.all.user.js

Large diffs are not rendered by default.

30 changes: 15 additions & 15 deletions dist/auto-task-v4.compatibility.user.js

Large diffs are not rendered by default.

12 changes: 8 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.2.15
// @version 4.2.16
// @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 @@ -8432,24 +8432,28 @@ console.log('%c%s', 'color:blue', 'Auto-Task[Load]: 脚本开始加载');
const tasks = $('.event-actions tr');
for (const task of tasks) {
pro.push(new Promise(resolve => {
var _$$find;
const taskDes = $(task).find('.event-action-label a');
const taskIcon = $(task).find('.event-action-icon i').attr('class') || '';
const taskName = taskDes.text().trim();
const taskType = (_$$find = $(task).find('button[data-type]')) === null || _$$find === void 0 ? void 0 : _$$find.attr('data-type');
if (taskIcon.includes('ban') || /AdBlock/i.test(taskName) || taskIcon.includes('envelope')) {
return resolve(true);
}
getRedirectLink(taskDes.attr('href')).then(taskLink => {
if (!taskLink) {
return resolve(false);
}
if (/^https?:\/\/steamcommunity\.com\/groups/.test(taskLink)) {
if (taskType === 'steam.group.join' && /'^https?:\/\/steamcommunity\.com\/groups'/.test(taskLink)) {
this.undoneTasks.steam.groupLinks.push(taskLink);
} else if (/like.*announcement/gi.test(taskName)) {
this.undoneTasks.steam.announcementLinks.push(taskLink);
} else if (taskIcon.includes('plus') && /^https?:\/\/store\.steampowered\.com\/app\//.test(taskLink)) {
} else if (taskType === 'steam.game.wishlist' && /^https?:\/\/store\.steampowered\.com\/app\//.test(taskLink)) {
this.undoneTasks.steam.wishlistLinks.push(taskLink);
} else if (taskIcon.includes('plus') && taskDes.attr('data-steam-wishlist-appid')) {
} else if (taskType === 'steam.game.wishlist' && taskDes.attr('data-steam-wishlist-appid')) {
this.undoneTasks.steam.wishlistLinks.push(`https://store.steampowered.com/app/${taskDes.attr('data-steam-wishlist-appid')}`);
} else if (taskType === 'steam.game.follow' && /^https?:\/\/store\.steampowered\.com\/app\//.test(taskLink)) {
this.undoneTasks.steam.followLinks.push(taskLink);
} else if (/^https?:\/\/store\.steampowered\.com\/curator\//.test(taskLink)) {
this.undoneTasks.steam.curatorLinks.push(taskLink);
} else if (taskIcon.includes('steam') && /follow|subscribe/gim.test(taskName)) {
Expand Down
Loading

1 comment on commit d61da84

@vercel
Copy link

@vercel vercel bot commented on d61da84 Jul 3, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.