Skip to content

Commit

Permalink
1. 安全优化;
Browse files Browse the repository at this point in the history
2. 更新反馈链接
  • Loading branch information
HCLonely committed Jan 1, 2022
1 parent a6c2fc7 commit 07f394c
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 27 deletions.
4 changes: 2 additions & 2 deletions dist/auto-task-v4-for-giveawaysu.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.

18 changes: 9 additions & 9 deletions dist/auto-task-v4.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -1666,7 +1666,7 @@ ${$.makeArray($('#auto-task-info>li')).map(element => element.innerText).join('\
icon: 'success',
confirmButtonText: i18n('ok')
}).then(() => {
window.open('https://keylol.com/forum.php?mod=post&action=reply&fid=319&tid=455167', '_blank');
window.open('https://keylol.com/forum.php?mod=post&action=reply&fid=319&tid=777450', '_blank');
});
} else {
external_Swal_default().fire({
Expand All @@ -1675,7 +1675,7 @@ ${$.makeArray($('#auto-task-info>li')).map(element => element.innerText).join('\
inputValue: text,
confirmButtonText: i18n('ok')
}).then(() => {
window.open('https://keylol.com/forum.php?mod=post&action=reply&fid=319&tid=455167', '_blank');
window.open('https://keylol.com/forum.php?mod=post&action=reply&fid=319&tid=777450', '_blank');
});
}
textarea.remove();
Expand Down Expand Up @@ -4329,9 +4329,9 @@ ${$.makeArray($('#auto-task-info>li')).map(element => element.innerText).join('\
});
} else {
const realChannels = this.getRealParams('channels', channelLinks, doTask, link => {
if (/^https:\/\/(www\.)?google\.com.*?\/url\?.*?url=https:\/\/www.youtube.com\/.*/.test(link)) {
if (/^https:\/\/(www\.)?google\.com.*?\/url\?.*?url=https:\/\/www\.youtube\.com\/.*/.test(link)) {
var _link$match;
return (_link$match = link.match(/url=(https:\/\/www.youtube.com\/.*)/)) === null || _link$match === void 0 ? void 0 : _link$match[1];
return (_link$match = link.match(/url=(https:\/\/www\.youtube\.com\/.*)/)) === null || _link$match === void 0 ? void 0 : _link$match[1];
}
return link;
});
Expand All @@ -4352,9 +4352,9 @@ ${$.makeArray($('#auto-task-info>li')).map(element => element.innerText).join('\
});
} else {
const realLikes = this.getRealParams('likes', videoLinks, doTask, link => {
if (/^https:\/\/(www\.)?google\.com.*?\/url\?.*?url=https:\/\/www.youtube.com\/.*/.test(link)) {
if (/^https:\/\/(www\.)?google\.com.*?\/url\?.*?url=https:\/\/www\.youtube\.com\/.*/.test(link)) {
var _link$match2;
return (_link$match2 = link.match(/url=(https:\/\/www.youtube.com\/.*)/)) === null || _link$match2 === void 0 ? void 0 : _link$match2[1];
return (_link$match2 = link.match(/url=(https:\/\/www\.youtube\.com\/.*)/)) === null || _link$match2 === void 0 ? void 0 : _link$match2[1];
}
return link;
});
Expand Down Expand Up @@ -5009,9 +5009,9 @@ ${$.makeArray($('#auto-task-info>li')).map(element => element.innerText).join('\
var _link$match10;
if (link.includes('store.steampowered.com')) {
var _link$match9;
return (_link$match9 = link.match(/store.steampowered.com\/news\/app\/([\d]+)\/view\/([\d]+)/)) === null || _link$match9 === void 0 ? void 0 : _link$match9.slice(1, 3).join('/');
return (_link$match9 = link.match(/store\.steampowered\.com\/news\/app\/([\d]+)\/view\/([\d]+)/)) === null || _link$match9 === void 0 ? void 0 : _link$match9.slice(1, 3).join('/');
}
return (_link$match10 = link.match(/steamcommunity.com\/games\/([\d]+)\/announcements\/detail\/([\d]+)/)) === null || _link$match10 === void 0 ? void 0 : _link$match10.slice(1, 3).join('/');
return (_link$match10 = link.match(/steamcommunity\.com\/games\/([\d]+)\/announcements\/detail\/([\d]+)/)) === null || _link$match10 === void 0 ? void 0 : _link$match10.slice(1, 3).join('/');
});
if (doTask && realAnnouncements.length > 0) {
for (const id of realAnnouncements) {
Expand Down Expand Up @@ -9833,7 +9833,7 @@ ${$.makeArray($('#auto-task-info>li')).map(element => element.innerText).join('\
$('#socialLink').val(await new social_Twitter().userName2id(name) || '');
} else if (type === 'youtubeChannel') {
var _link$match2, _await$getInfo, _await$getInfo$params;
const name = /^https:\/\/(www\.)?google\.com.*?\/url\?.*?url=https:\/\/www.youtube.com\/.*/.test(link) ? (_link$match2 = link.match(/url=(https:\/\/www.youtube.com\/.*)/)) === null || _link$match2 === void 0 ? void 0 : _link$match2[1] : link;
const name = /^https:\/\/(www\.)?google\.com.*?\/url\?.*?url=https:\/\/www.youtube.com\/.*/.test(link) ? (_link$match2 = link.match(/url=(https:\/\/www\.youtube\.com\/.*)/)) === null || _link$match2 === void 0 ? void 0 : _link$match2[1] : link;
$('#socialLink').val(((_await$getInfo = await getInfo(name, 'channel')) === null || _await$getInfo === void 0 ? void 0 : (_await$getInfo$params = _await$getInfo.params) === null || _await$getInfo$params === void 0 ? void 0 : _await$getInfo$params.channelId) || '');
}
});
Expand Down
6 changes: 3 additions & 3 deletions src/scripts/social/Steam.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* @Author : HCLonely
* @Date : 2021-10-04 16:07:55
* @LastEditTime : 2021-12-25 13:02:10
* @LastEditTime : 2022-01-01 10:51:54
* @LastEditors : HCLonely
* @FilePath : /auto-task-new/src/scripts/social/Steam.ts
* @Description : steam相关功能
Expand Down Expand Up @@ -1081,10 +1081,10 @@ class Steam extends Social {
const realAnnouncements = this.getRealParams('announcements', announcementLinks, doTask,
(link) => {
if (link.includes('store.steampowered.com')) {
return link.match(/store.steampowered.com\/news\/app\/([\d]+)\/view\/([\d]+)/)?.slice(1, 3)
return link.match(/store\.steampowered\.com\/news\/app\/([\d]+)\/view\/([\d]+)/)?.slice(1, 3)
.join('/');
}
return link.match(/steamcommunity.com\/games\/([\d]+)\/announcements\/detail\/([\d]+)/)?.slice(1, 3)
return link.match(/steamcommunity\.com\/games\/([\d]+)\/announcements\/detail\/([\d]+)/)?.slice(1, 3)
.join('/');
});
if (doTask && realAnnouncements.length > 0) {
Expand Down
10 changes: 5 additions & 5 deletions src/scripts/social/Youtube.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* @Author : HCLonely
* @Date : 2021-10-04 12:18:06
* @LastEditTime : 2021-12-25 17:19:52
* @LastEditTime : 2022-01-01 10:50:45
* @LastEditors : HCLonely
* @FilePath : /auto-task-new/src/scripts/social/Youtube.ts
* @Description : Youtube 订阅/取消订阅频道,点赞/取消点赞视频
Expand Down Expand Up @@ -379,8 +379,8 @@ class Youtube extends Social {
echoLog({ type: 'globalOptionsSkip', text: 'youtube.channels' });
} else {
const realChannels = this.getRealParams('channels', channelLinks, doTask, (link) => {
if (/^https:\/\/(www\.)?google\.com.*?\/url\?.*?url=https:\/\/www.youtube.com\/.*/.test(link)) {
return link.match(/url=(https:\/\/www.youtube.com\/.*)/)?.[1];
if (/^https:\/\/(www\.)?google\.com.*?\/url\?.*?url=https:\/\/www\.youtube\.com\/.*/.test(link)) {
return link.match(/url=(https:\/\/www\.youtube\.com\/.*)/)?.[1];
}
return link;
});
Expand All @@ -398,8 +398,8 @@ class Youtube extends Social {
echoLog({ type: 'globalOptionsSkip', text: 'youtube.likes' });
} else {
const realLikes = this.getRealParams('likes', videoLinks, doTask, (link) => {
if (/^https:\/\/(www\.)?google\.com.*?\/url\?.*?url=https:\/\/www.youtube.com\/.*/.test(link)) {
return link.match(/url=(https:\/\/www.youtube.com\/.*)/)?.[1];
if (/^https:\/\/(www\.)?google\.com.*?\/url\?.*?url=https:\/\/www\.youtube\.com\/.*/.test(link)) {
return link.match(/url=(https:\/\/www\.youtube\.com\/.*)/)?.[1];
}
return link;
});
Expand Down
6 changes: 3 additions & 3 deletions src/scripts/tools/throwError.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* @Author : HCLonely
* @Date : 2021-10-13 14:08:18
* @LastEditTime : 2021-12-31 14:54:33
* @LastEditTime : 2022-01-01 13:52:17
* @LastEditors : HCLonely
* @FilePath : /auto-task-new/src/scripts/tools/throwError.ts
* @Description : 错误处理函数
Expand Down Expand Up @@ -68,7 +68,7 @@ ${$.makeArray($('#auto-task-info>li')).map((element) => element.innerText)
icon: 'success',
confirmButtonText: __('ok')
}).then(() => {
window.open('https://keylol.com/forum.php?mod=post&action=reply&fid=319&tid=455167', '_blank');
window.open('https://keylol.com/forum.php?mod=post&action=reply&fid=319&tid=777450', '_blank');
});
} else {
Swal.fire({
Expand All @@ -77,7 +77,7 @@ ${$.makeArray($('#auto-task-info>li')).map((element) => element.innerText)
inputValue: text,
confirmButtonText: __('ok')
}).then(() => {
window.open('https://keylol.com/forum.php?mod=post&action=reply&fid=319&tid=455167', '_blank');
window.open('https://keylol.com/forum.php?mod=post&action=reply&fid=319&tid=777450', '_blank');
});
}
textarea.remove();
Expand Down
4 changes: 2 additions & 2 deletions src/scripts/website/Setting.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* @Author : HCLonely
* @Date : 2021-12-25 19:00:53
* @LastEditTime : 2021-12-30 12:01:59
* @LastEditTime : 2022-01-01 10:49:29
* @LastEditors : HCLonely
* @FilePath : /auto-task-new/src/scripts/website/Setting.ts
* @Description : 设置页面
Expand Down Expand Up @@ -149,7 +149,7 @@ class Setting {
$('#socialLink').val(await new Twitter().userName2id(name) || '');
} else if (type === 'youtubeChannel') {
const name = /^https:\/\/(www\.)?google\.com.*?\/url\?.*?url=https:\/\/www.youtube.com\/.*/.test(link) ?
link.match(/url=(https:\/\/www.youtube.com\/.*)/)?.[1] :
link.match(/url=(https:\/\/www\.youtube\.com\/.*)/)?.[1] :
link;
$('#socialLink').val((await getInfo(name as string, 'channel'))?.params?.channelId || '');
}
Expand Down

1 comment on commit 07f394c

@vercel
Copy link

@vercel vercel bot commented on 07f394c Jan 1, 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.