// ==UserScript== // @name auto-task-v4 // @namespace auto-task-v4 // @version 4.1.1-Beta // @description 赠Key站自动任务 // @author HCLonely // @license MIT // @run-at document-start // @homepage https://auto-task-doc.js.org/ // @supportURL https://github.com/HCLonely/auto-task-v4/issues // @include *://freeanywhere.net/* // @include *://giveaway.su/giveaway/view/* // @include *://givee.club/*/event/* // @include *://givekey.ru/giveaway/* // @include *://www.indiedb.com/giveaways* // @include *://key-hub.eu/giveaway/* // @include *://keylol.com/* // @include *://www.opiumpulses.com/giveaways // @include *://prys.revadike.com/giveaway/?id=* // @include *://opquests.com/quests/* // @include *://gleam.io/* // @include *://sweepwidget.com/view/* // @include *://discord.com/* // @include *://www.twitch.tv/* // @include *://www.youtube.com/* // @include *://*.reddit.com/* // @include *://twitter.com/settings/account?k* // @include https://auto-task-v4.hclonely.com/setting.html // @include https://auto-task-v4.hclonely.com/history.html // @grant GM_setValue // @grant GM_getValue // @grant GM_listValues // @grant GM_deleteValue // @grant GM_addStyle // @grant GM_xmlhttpRequest // @grant GM_getResourceText // @grant GM_registerMenuCommand // @grant GM_info // @grant GM_openInTab // @grant GM_notification // @grant unsafeWindow // @grant window.close // @grant window.localStorage // @connect cdn.jsdelivr.net // @connect store.steampowered.com // @connect steamcommunity.com // @connect twitter.com // @connect api.twitter.com // @connect youtube.com // @connect www.youtube.com // @connect facebook.com // @connect instagram.com // @connect vk.com // @connect twitch.tv // @connect www.twitch.tv // @connect gql.twitch.tv // @connect github.com // @connect discordapp.com // @connect discord.gg // @connect discord.com // @connect www.reddit.com // @connect oauth.reddit.com // @connect raw.githubusercontent.com // @connect t.me // @connect bit.ly // @connect giveaway.su // @connect google.com // @connect www.vloot.io // @connect givee.club // @connect * // @require https://cdn.jsdelivr.net/npm/jquery@3.6.0/dist/jquery.min.js // @require https://cdn.jsdelivr.net/npm/js-cookie@3.0.1/dist/js.cookie.min.js // @require https://cdn.jsdelivr.net/npm/regenerator-runtime@0.13.5/runtime.min.js // @require https://cdn.jsdelivr.net/npm/js-sha1@0.6.0/src/sha1.min.js // @require https://cdn.jsdelivr.net/npm/sweetalert2@11 // @require https://cdn.jsdelivr.net/npm/keyboardjs@2.6.4/dist/keyboard.min.js // @require https://cdn.jsdelivr.net/npm/dayjs@1.10.7/dayjs.min.js // @compatible Tampermonkey Only // @noframes // @downloadURL none // ==/UserScript== console.log('%c%s', 'color:blue', 'Auto Task脚本开始加载'); (function() { var __webpack_modules__ = { 514: function(__unused_webpack_module, exports) { !function(e, n) { true ? n(exports) : 0; }(this, function(e) { 'use strict'; var t = function() { return (t = Object.assign || function(e) { for (var n, o = 1, t = arguments.length; o < t; o++) { for (var r in n = arguments[o]) { Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]); } } return e; }).apply(this, arguments); }; function r(e, n, o) { if (o || 2 === arguments.length) { for (var t, r = 0, i = n.length; r < i; r++) { !t && r in n || ((t = t || Array.prototype.slice.call(n, 0, r))[r] = n[r]); } } return e.concat(t || Array.prototype.slice.call(n)); } function d(e) { return '[object Object]' === n(e); } function l(e, n) { var o = r(r([], n || [], !0), [ '_' ], !1).join('|'); return e.replace(new RegExp('(('.concat(o, ')[a-z])+'), 'g'), function(e, n) { return n.replace(new RegExp(o), '').toLocaleUpperCase(); }); } var n = function(e) { return Object.prototype.toString.call(e); }; var o = (i.prototype.init = function() { try { this.getSystemName(), this.getBrowserName(); } catch (e) { console.warn('[UA formatter error] '.concat(e)); } }, i.prototype.getEngine = function() { var e = this.agent; return -1 !== e.indexOf('Trident') ? 'Trident' : -1 !== e.indexOf('Firefox') ? 'Gecko' : -1 !== e.indexOf('Presto') ? 'Presto' : 'WebKit'; }, i.prototype.getSystemName = function() { var e, n = (this.agent.match(/^[a-z]+\/\d+\.\d+\s?\(([a-z\d\s:;./_-]+)\)/i) || [])[1]; try { var o = ''; if (/Windows/i.test(n)) { var t = (n.match(/NT\s(\d+\.\d+)/) || [])[1]; switch (this.info.os = 'Windows', t) { case '6.3': o = '8.1'; break; case '6.2': o = '8'; break; case '6.1': o = '7'; break; case '5.2': case '5.1': o = 'XP'; break; default: o = t; } return this.info.device = 'PC', void (this.info.osVersion = o); } if (/^Macintosh/i.test(n)) { return o = (n.match(/X\s((\d+(_|\.))+\d+)/) || [])[1], this.info.os = 'Macintosh', this.info.device = 'PC', void (this.info.osVersion = null !== (e = null == o ? void 0 : o.replace(/_/g, '.')) && void 0 !== e ? e : 'Unknown'); } if (/^iPad/i.test(n)) { return o = (n.match(/((\d+_)+\d+)/) || [])[1], this.info.os = 'iPad', this.info.device = 'Tablet', void (this.info.osVersion = o.replace(/_/g, '.')); } if (/^iPhone/i.test(n)) { return o = (n.match(/((\d+_)+\d+)/) || [])[1], this.info.os = 'iPhone', this.info.device = 'Mobile', void (this.info.osVersion = o.replace(/_/g, '.')); } if (-1 !== n.indexOf('Android')) { var r = (n.match(/Android\s((\d+\.?)+\d?)/) || [])[1]; return this.info.device = 'Mobile', this.info.os = 'Android', void (this.info.osVersion = r); } if (/Linux\s[a-z\d_]+/.test(n)) { return this.info.os = 'Linux', void (this.info.osVersion = 'Unknown'); } this.info.os = 'Unknown', this.info.osVersion = 'Unknown'; } catch (e) { this.info.os = 'Unknown', this.info.osVersion = 'Unknown'; } }, i.prototype.getBrowserName = function() { var e = Object.keys(this.browserNameMap).map(function(e) { return new RegExp(''.concat(e, '(\\/|\\s)(\\d+\\.)+\\d+')); }), n = 1 < (n = (this.agent.match(/[a-z\d]+(\/|\s)(\d+\.)+\d+/gi) || []).filter(function(n) { return -1 !== e.findIndex(function(e) { return e.test(n); }); })).length && !/^Safari/.test(n[n.length - 1]) ? n.reverse() : n; this.info = t(t({}, this.info), this._formatBrowserVersion(n[0])); }, i.prototype._formatBrowserVersion = function(e) { var n, o, t, r; try { for (var i = null !== (o = null === (n = e.match(/(?[a-z\d]+)(\/|\s)(?(\d+\.)+\d+)/i)) || void 0 === n ? void 0 : n.groups) && void 0 !== o ? o : {}, s = i.name, a = i.version, c = {}, f = 0, u = Object.entries(this.browserNameMap); f < u.length; f++) { var d = u[f], l = d[0], h = d[1]; if (new RegExp(l).test(s)) { c = h; break; } } var p = { browserVersion: null != a ? a : 'Unknown', browser: null !== (t = c.en) && void 0 !== t ? t : 'Unknown', browserZH: null !== (r = (null == c ? void 0 : c.zh) || c.en) && void 0 !== r ? r : 'Unknown' }; return 'Trident' === s && (p.browserVersion = { '4.0': 8, '5.0': 9, '6.0': 10, '7.0': 11 }[a]), p; } catch (e) { return console.warn('[UA formatter error] '.concat(e)), { browser: 'Unknown', browserVersion: 'Unknown' }; } }, i); function i(e) { this.agent = '', this.info = { browser: '', browserZH: '', browserVersion: '', os: '', osVersion: '', device: 'Unknown', engine: 'WebKit' }, this.browserNameMap = { MicroMessenger: { en: 'MicroMessenger', zh: '微信' }, MetaSr: { en: 'MetaSr', zh: '搜狗浏览器' }, 'QQ(Browser)?': { en: 'QQBrowser', zh: 'QQ浏览器' }, UCBrowser: { en: 'UCBrowser', zh: 'UC浏览器' }, '2345Explorer': { en: '2345Explorer', zh: '2345极速浏览器' }, Mb2345Browser: { en: 'Mb2345Browser', zh: '2345手机浏览器' }, Trident: { en: 'Internet Explorer' }, 'Edge?': { en: 'Edge' }, OPR: { en: 'Opera' }, Vivaldi: { en: 'Vivaldi' }, Firefox: { en: 'Firefox' }, Chrome: { en: 'Chrome' }, Safari: { en: 'Safari' } }, this.agent = e, this.init(); var n = this.info, o = n.browser, e = n.browserVersion, n = n.osVersion; this.info = t(t({}, this.info), { engine: this.getEngine(), browserVersion: 'Safari' === o ? n : e }); } function s() { this.cookies = {}, this.init(); } var a = new (s.prototype.init = function() { var o = {}; document.cookie.split(/;\s/).forEach(function(e) { var n = e.split(/=/), e = n[0], n = n[1]; o[e] = n; }), this.cookies = o; }, s.prototype.getItem = function(e) { return this.cookies[e]; }, s.prototype.getAllItems = function() { return this.cookies; }, s.prototype.setItem = function(e, n, o, t, r, i) { document.cookie = ''.concat(e, '=').concat(n).concat(o ? '; expires='.concat(o) : '').concat(t ? '; path='.concat(t) : '').concat(r ? '; domain='.concat(r) : '').concat(i ? '; secure' : ''); }, s)(); e.countDown = function e(n, o, t, r) { if (!window) { throw new Error('window is not defind.'); } if (0 < n) { return r && r(), n--, window[o] = window.setTimeout(function() { e(n, o, t, r); }, 1e3), function() { return clearTimeout(window[o]); }; } clearTimeout(window[o]), t && t(); }, e.createRandomID = function(e) { void 0 === e && (e = 12); for (var n = [], o = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'.split(''), t = o.length, r = 0; r < e; r++) { n.push(o[Math.round(Math.random() * t)]); } return n.join(''); }, e.dCookie = a, e.debounce = function(o, t, r) { var i; void 0 === t && (t = 0); var s = r = void 0 === r ? !1 : r; return function() { var e = this, n = arguments; s && (o.apply(this, arguments), s = !1), clearTimeout(i), i = setTimeout(function() { r ? s = !0 : o.apply(e, n); }, t); }; }, e.deepCopy = function e(n) { if (d(n) || Array.isArray(n)) { var o, t = Array.isArray(n) ? [] : {}; for (o in n) { t[o] = e(n[o]); } return t; } return n; }, e.formatQueryParams = function(e) { e = null === (e = /\?(?(.*)=.+)/.exec(decodeURIComponent(e))) || void 0 === e ? void 0 : e.groups; if (!e) { return {}; } for (var n = e.params.split('&'), t = {}, o = 0; o < n.length; o++) { n[o].replace(/([^?&]*)=([^?&]*)/, function(e, n, o) { return t[n] = o, e; }); } return t; }, e.formatThousandth = function(e) { var n = ''.concat(e).split('.'), e = n[0], n = n[1], n = void 0 === n ? '' : n, e = e.replace(/\d{1,3}(?=(\d{3})+$)/g, '$&,'); return ''.concat(e).concat(n ? '.'.concat(n) : ''); }, e.generateTree = function e(n, o, t, r) { for (var i = [], s = 0; s < n.length; s++) { var a = n[s]; a[t] === o && (i.push(a), a.children = e(n, a[null != r ? r : 'id'], t, r)); } return i; }, e.isEmpty = function(e) { return Array.isArray(e) ? 0 === e.length : d(e) ? 0 === Object.keys(e).length : [ '[object Set]', '[object Map]' ].includes(n(e)) ? 0 === e.size : [ null, void 0, '' ].includes(e); }, e.isFunction = function(e) { return '[object Function]' === n(e); }, e.isImageUrl = function(e) { return /\.((png)|(jpe?g)|(gif)|(svg)|(webp))$/gi.test(e); }, e.isObject = d, e.isRegexp = function(e) { return '[object RegExp]' === n(e); }, e.objectKeyToCamelCase = function e(n, o, t) { if (Array.isArray(n)) { for (var r = [], i = 0; i < n.length; i++) { r[i] = e(o && n[i][o] ? n[i][o] : n[i], o, t); } } else if (d(n)) { r = {}; for (var s = o && n[o] ? n[o] : n, a = 0, c = Object.entries(s); a < c.length; a++) { var f = (u = c[a])[0], u = u[1]; Array.isArray(u) || d(s) ? r[l(f, t)] = e(u, o, t) : r[l(f, t)] = u; } } else { r = n; } return r; }, e.realType = n, e.searchParams = function(e, n) { return void 0 === e && (e = null === location || void 0 === location ? void 0 : location.search), new URLSearchParams(e).get(n); }, e.toLowerCamelCase = l, e.toUnderline = function(e) { return e.replace(/([A-Z])/g, function(e) { return '_'.concat(e.toLocaleLowerCase()); }); }, e.ua = function(e) { return void 0 === e && (e = navigator.userAgent), new o(e).info; }, Object.defineProperty(e, '__esModule', { value: !0 }); }); }, 786: function(module, __webpack_exports__, __webpack_require__) { 'use strict'; __webpack_require__.d(__webpack_exports__, { Z: function() { return __WEBPACK_DEFAULT_EXPORT__; } }); var _node_modules_pnpm_registry_npmmirror_com_css_loader_6_5_1_webpack_5_60_0_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(220); var _node_modules_pnpm_registry_npmmirror_com_css_loader_6_5_1_webpack_5_60_0_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(_node_modules_pnpm_registry_npmmirror_com_css_loader_6_5_1_webpack_5_60_0_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__); var _node_modules_pnpm_registry_npmmirror_com_css_loader_6_5_1_webpack_5_60_0_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(400); var _node_modules_pnpm_registry_npmmirror_com_css_loader_6_5_1_webpack_5_60_0_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = __webpack_require__.n(_node_modules_pnpm_registry_npmmirror_com_css_loader_6_5_1_webpack_5_60_0_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); var ___CSS_LOADER_EXPORT___ = _node_modules_pnpm_registry_npmmirror_com_css_loader_6_5_1_webpack_5_60_0_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_node_modules_pnpm_registry_npmmirror_com_css_loader_6_5_1_webpack_5_60_0_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()); ___CSS_LOADER_EXPORT___.push([ module.id, '.colorful-button,#auto-task-buttons a.auto-task-website-btn,.show-button-div a.auto-task-website-btn,body.auto-task-options .auto-task-form table button{position:relative;padding:5px 10px;text-align:center;color:#fff;text-decoration:none;background:linear-gradient(90deg, #03a9f4, #f441a5, #ffeb3b, #03a9f4);border-radius:30px;background-size:400%;text-transform:capitalize}.colorful-button:hover,#auto-task-buttons a.auto-task-website-btn:hover,.show-button-div a.auto-task-website-btn:hover,body.auto-task-options .auto-task-form table button:hover{animation:animate 8s linear infinite;cursor:pointer}.colorful-button:hover::before,#auto-task-buttons a.auto-task-website-btn:hover::before,.show-button-div a.auto-task-website-btn:hover::before,body.auto-task-options .auto-task-form table button:hover::before{filter:blur(20px);opacity:1}.colorful-button::before,#auto-task-buttons a.auto-task-website-btn::before,.show-button-div a.auto-task-website-btn::before,body.auto-task-options .auto-task-form table button::before{content:"";position:absolute;top:-5px;left:-5px;right:-5px;bottom:-5px;z-index:-1;background:linear-gradient(90deg, #03a9f4, #f441a5, #ffeb3b, #03a9f4);border-radius:40px;background-size:400%;opacity:-1;transition:.5s}@keyframes animate{0%{background-position:0%}100%{background-position:100%}}#auto-task-info{position:fixed;bottom:10px;right:10px;width:60%;max-width:500px;max-height:60%;overflow-y:auto;color:#000;background-color:#fff;padding-left:5px;z-index:999999999 !important;border:solid 2px #add8e6;border-radius:10px}#auto-task-info li{text-align:left}#auto-task-info .success{color:green}#auto-task-info .error{color:red}#auto-task-info .warning{color:blue}#auto-task-info .info{color:#ff0}.auto-task-keylol{display:inline-block;text-transform:capitalize;margin-left:10px;text-decoration:none !important;border:solid 1px;border-radius:5px;padding:0 2px}.auto-task-keylol[selected=selected]{background-color:blue !important;color:#fff !important}.auto-task-form table{font-family:verdana,arial,sans-serif;font-size:11px;color:#333;border-width:1px;border-color:#999;border-collapse:collapse;width:100%}.auto-task-form table thead td{border-width:1px;padding:8px;border-style:solid;border-color:#a9c6c9;font-weight:bold;background-color:#fff}.auto-task-form table tbody tr{background-color:#d4e3e5}.auto-task-form table tbody tr:hover{background-color:#ff6 !important}.auto-task-form table tbody tr th{background-color:#c3dde0;border-width:1px;padding:8px;border-style:solid;border-color:#a9c6c9;text-transform:capitalize}.auto-task-form table tbody tr td{border-width:1px;padding:8px;border-style:solid;border-color:#a9c6c9}.swal2-modal{width:70% !important;max-width:1000px !important}body.auto-task-options{padding-top:10px;text-align:center}body.auto-task-options .auto-task-form{width:80%;max-width:1000px;margin:0 auto;padding-bottom:20px}body.auto-task-options .auto-task-form table input.editOption{width:80%}body.auto-task-options .auto-task-form table #getTwitterUserId,body.auto-task-options .auto-task-form table #getYoutubeChannelId{margin-top:5px}body.auto-task-options .auto-task-form table button{z-index:1}body.auto-task-options .auto-task-form table input[type=text]{outline-style:none;border:1px solid #ccc;border-radius:3px;padding:5px 10px;font-size:14px}body.auto-task-options .auto-task-form table input[type=text]:focus{border-color:#66afe9;outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}body.auto-task-options .auto-task-form table label{position:relative;width:160px;height:80px;cursor:pointer;transform:scale(0.25);margin:-25% 0;top:-30px;display:inline-block}body.auto-task-options .auto-task-form table label input{position:relative;z-index:1;-webkit-appearance:none;appearance:none}body.auto-task-options .auto-task-form table label input:checked~span{background:#05be05;box-shadow:0 15px 25px rgba(5,190,5,0.4)}body.auto-task-options .auto-task-form table label input:checked~span i{left:84px}body.auto-task-options .auto-task-form table label input:checked~span i::before{background:#05be05;box-shadow:35px 0 0 #05be05}body.auto-task-options .auto-task-form table label input:checked~span i::after{bottom:12px;height:15px;border-bottom-left-radius:15px;border-bottom-right-radius:15px;background:#05be05}body.auto-task-options .auto-task-form table label span{position:absolute;top:0;left:0;width:100%;height:100%;background:#fe0000;border-radius:80px;transition:.5s;box-shadow:0 15px 25px rgba(254,0,0,0.4)}body.auto-task-options .auto-task-form table label span i{position:absolute;top:4px;left:4px;width:72px;height:72px;background:#fff;border-radius:50%}body.auto-task-options .auto-task-form table label span i::before{content:"";position:absolute;top:22px;left:12px;width:12px;height:12px;border-radius:50%;background:#fe0000;box-shadow:35px 0 0 #fe0000;transition:.5s}body.auto-task-options .auto-task-form table label span i::after{content:"";position:absolute;bottom:15px;left:calc(50% - 15px);width:30px;height:6px;border-radius:6px;background:#fe0000;transition:.5s}body.auto-task-history{font-size:15px;font-weight:400;line-height:1.5}body.auto-task-history .container a{color:#007bff;text-decoration:none;background-color:transparent}body.auto-task-history .container .card{width:80%;max-width:800px;border-radius:10px;background:rgba(118,118,118,0.10196);border-top:1px solid rgba(255,255,255,0.50196);-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);box-shadow:0 15px 25px rgba(0,0,0,0.10196);margin:20px auto;position:relative;display:flex;flex-direction:column;word-wrap:break-word;background-clip:border-box;border:1px solid rgba(0,0,0,.125);border-radius:.25rem}body.auto-task-history .container .card .title{text-align:center;font-size:30px;font-weight:bold;margin:5px 0}body.auto-task-history .container .card .title a:hover{text-decoration:none;background:#93e1ff;border-radius:10px;padding:3px}body.auto-task-history .container .card ul{margin-bottom:25px}body.auto-task-history .container .card ul li{margin-bottom:5px;line-height:20px}body.auto-task-history .container .card ul a:hover{text-decoration:underline}body.auto-task-history .container .card .delete-task{right:10px;width:38px;height:35px;position:absolute;font-size:24px;cursor:pointer;border-radius:10px}body.auto-task-history .container .card .delete-task:hover{background:#fff}body.auto-task-history .container .card .time{right:5px;position:absolute;bottom:0;color:#e83e8c;font-family:\'SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace\';font-size:15px}#auto-task-buttons,.show-button-div{position:fixed;top:30px;right:15px;width:150px;z-index:999999999 !important;transform:scale(0.9)}#auto-task-buttons p,.show-button-div p{line-height:30px;height:40px;text-align:center;margin:5px !important}#auto-task-buttons a.auto-task-website-btn,.show-button-div a.auto-task-website-btn{width:150px;height:40px;line-height:30px;font-size:20px}.show-button-div{width:20px}.auto-task-capitalize{text-transform:capitalize !important}.swal2-file:focus,.swal2-input:focus,.swal2-textarea:focus{box-shadow:inset 0px 0px 4px 1px rgba(100,150,200,.5) !important}.swal2-checkbox-custom{align-items:center;justify-content:center;background:#fff;color:inherit;margin:1em auto}.swal2-checkbox-custom input{flex-shrink:0;margin:0 .4em}', '' ]); const __WEBPACK_DEFAULT_EXPORT__ = ___CSS_LOADER_EXPORT___.toString(); }, 400: function(module) { 'use strict'; module.exports = function(cssWithMappingToString) { var list = []; list.toString = function toString() { return this.map(function(item) { var content = ''; var needLayer = typeof item[5] !== 'undefined'; if (item[4]) { content += '@supports ('.concat(item[4], ') {'); } if (item[2]) { content += '@media '.concat(item[2], ' {'); } if (needLayer) { content += '@layer'.concat(item[5].length > 0 ? ' '.concat(item[5]) : '', ' {'); } content += cssWithMappingToString(item); if (needLayer) { content += '}'; } if (item[2]) { content += '}'; } if (item[4]) { content += '}'; } return content; }).join(''); }; list.i = function i(modules, media, dedupe, supports, layer) { if (typeof modules === 'string') { modules = [ [ null, modules, undefined ] ]; } var alreadyImportedModules = {}; if (dedupe) { for (var k = 0; k < this.length; k++) { var id = this[k][0]; if (id != null) { alreadyImportedModules[id] = true; } } } for (var _k = 0; _k < modules.length; _k++) { var item = [].concat(modules[_k]); if (dedupe && alreadyImportedModules[item[0]]) { continue; } if (typeof layer !== 'undefined') { if (typeof item[5] === 'undefined') { item[5] = layer; } else { item[1] = '@layer'.concat(item[5].length > 0 ? ' '.concat(item[5]) : '', ' {').concat(item[1], '}'); item[5] = layer; } } if (media) { if (!item[2]) { item[2] = media; } else { item[1] = '@media '.concat(item[2], ' {').concat(item[1], '}'); item[2] = media; } } if (supports) { if (!item[4]) { item[4] = ''.concat(supports); } else { item[1] = '@supports ('.concat(item[4], ') {').concat(item[1], '}'); item[4] = supports; } } list.push(item); } }; return list; }; }, 220: function(module) { 'use strict'; module.exports = function(i) { return i[1]; }; } }; var __webpack_module_cache__ = {}; function __webpack_require__(moduleId) { var cachedModule = __webpack_module_cache__[moduleId]; if (cachedModule !== undefined) { return cachedModule.exports; } var module = __webpack_module_cache__[moduleId] = { id: moduleId, exports: {} }; __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__); return module.exports; } !function() { __webpack_require__.n = function(module) { var getter = module && module.__esModule ? function() { return module['default']; } : function() { return module; }; __webpack_require__.d(getter, { a: getter }); return getter; }; }(); !function() { __webpack_require__.d = function(exports, definition) { for (var key in definition) { if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); } } }; }(); !function() { __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }; }(); var __webpack_exports__ = {}; !function() { 'use strict'; const external_Swal_namespaceObject = Swal; var external_Swal_default = __webpack_require__.n(external_Swal_namespaceObject); const external_Cookies_namespaceObject = Cookies; var auto_task = __webpack_require__(786); var javascript_utils_umd_min = __webpack_require__(514); const httpRequest = async function(options) { let times = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; try { const result = await new Promise(resolve => { if (options.dataType) { options.responseType = options.dataType; } const requestObj = { ...{ timeout: 3e4, ontimeout(data) { resolve({ result: 'Error', statusText: 'Timeout', status: 601, data: data, options: options }); }, onabort(data) { resolve({ result: 'Error', statusText: 'Aborted', status: 602, data: data, options: options }); }, onerror(data) { resolve({ result: 'Error', statusText: 'Error', status: 603, data: data, options: options }); }, onload(data) { resolve({ result: 'Success', statusText: 'Load', status: 600, data: data, options: options }); } }, ...options }; GM_xmlhttpRequest(requestObj); }); console.log('发送请求:', result); if (result.status !== 600 && times < 2) { return await httpRequest(options, times + 1); } return result; } catch (error) { throwError(error, 'httpRequest'); console.log('发送请求:', { errorMsg: error, options: options }); return { result: 'JsError', statusText: 'Error', status: 604, error: error, options: options }; } }; const tools_httpRequest = httpRequest; const echoLog = _ref => { let { type, text, html, id } = _ref; const emptyStatus = { success: () => emptyStatus, error: () => emptyStatus, warning: () => emptyStatus, info: () => emptyStatus, view: () => emptyStatus }; try { var _ele$; let ele; if (type) { switch (type) { case 'joiningSteamGroup': case 'leavingSteamGroup': case 'gettingSteamGroupId': ele = $(`
  • ${i18n(type)}${text}...
  • `); break; case 'subscribingForum': case 'unsubscribingForum': case 'gettingForumId': ele = $(`
  • ${i18n(type)}${text}...
  • `); break; case 'followingCurator': case 'unfollowingCurator': case 'getCuratorId': ele = $(`
  • ${i18n(type)}${text}...
  • `); break; case 'addingToWishlist': case 'removingFromWishlist': case 'followingGame': case 'unfollowingGame': ele = $(`
  • ${i18n(type)}${text}...
  • `); break; case 'favoritingWorkshop': case 'unfavoritingWorkshop': case 'gettingWorkshopAppId': case 'votingUpWorkshop': ele = $(`
  • ${i18n(type)} ${text}...
  • `); break; case 'gettingAnnouncementParams': case 'likingAnnouncement': ele = $(`
  • ${i18n(type)} ${id}...
  • `); break; case 'joiningDiscordServer': case 'gettingDiscordGuild': ele = $(`
  • ${i18n(type)}${text}...
  • `); break; case 'leavingDiscordServer': ele = $(`
  • ${i18n(type)}${text}...
  • `); break; case 'updateDiscordAuth': ele = $(`
  • ${i18n('updateDiscordAuth')}
  • `); break; case 'followingTwitchChannel': case 'unfollowingTwitchChannel': case 'gettingTwitchChannelId': ele = $(`
  • ${i18n(type)}${text}...
  • `); break; case 'gettingInsUserId': case 'followingIns': case 'unfollowingIns': ele = $(`
  • ${i18n(type)}${text}...
  • `); break; case 'gettingTwitterUserId': case 'followingTwitterUser': case 'unfollowingTwitterUser': ele = $(`
  • ${i18n(type)}${text}...
  • `); break; case 'retweetting': case 'unretweetting': ele = $(`
  • ${i18n(type)}${text}...
  • `); break; case 'joiningReddit': case 'leavingReddit': ele = $(`
  • ${i18n(type)}${text}...
  • `); break; case 'followingRedditUser': case 'unfollowingRedditUser': ele = $(`
  • ${i18n(type)} ${text === null || text === void 0 ? void 0 : text.replace('u_', '')}...
  • `); break; case 'followingYtbChannel': case 'unfollowingYtbChannel': ele = $(`
  • ${i18n(type)}${text}...
  • `); break; case 'likingYtbVideo': case 'unlikingYtbVideo': ele = $(`
  • ${i18n(type)}${text}...
  • `); break; case 'gettingVkId': case 'joiningVkGroup': case 'leavingVkGroup': case 'joiningVkPublic': case 'leavingVkPublic': case 'sendingVkWall': case 'deletingVkWall': ele = $(`
  • ${i18n(type)}${text}...
  • `); break; case 'visitingLink': ele = $(`
  • ${i18n('visitingLink')}${text}...
  • `); break; case 'verifyingInsAuth': case 'text': ele = $(`
  • ${i18n(text)}
  • `); break; case 'html': ele = $(text || html); break; case 'whiteList': ele = $(`
  • ${i18n('skipTask')}[${text}(${id})](${i18n('whiteList')})
  • `); break; case 'globalOptionsSkip': ele = $(`
  • ${i18n('skipTaskOption')}${text}
  • `); break; default: ele = $(`
  • ${i18n('unKnown')}:${type}(${text})...
  • `); break; } } else if (text) { ele = $(`
  • ${i18n(text)}
  • `); } else if (html) { ele = $(html); } else { return emptyStatus; } ele.addClass('card-text'); $('#auto-task-info').append(ele); (_ele$ = ele[0]) === null || _ele$ === void 0 ? void 0 : _ele$.scrollIntoView(); const font = ele.find('font'); const status = { font: font, success() { var _this$font, _this$font2, _this$font3; let text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'Success'; let html = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; (_this$font = this.font) === null || _this$font === void 0 ? void 0 : _this$font.attr('class', '').addClass('success'); html ? (_this$font2 = this.font) === null || _this$font2 === void 0 ? void 0 : _this$font2.html(text) : (_this$font3 = this.font) === null || _this$font3 === void 0 ? void 0 : _this$font3.text(text); return this; }, error() { var _this$font4, _this$font5, _this$font6; let text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'Error'; let html = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; (_this$font4 = this.font) === null || _this$font4 === void 0 ? void 0 : _this$font4.attr('class', '').addClass('error'); html ? (_this$font5 = this.font) === null || _this$font5 === void 0 ? void 0 : _this$font5.html(text) : (_this$font6 = this.font) === null || _this$font6 === void 0 ? void 0 : _this$font6.text(text); return this; }, warning() { var _this$font7, _this$font8, _this$font9; let text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'Warning'; let html = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; (_this$font7 = this.font) === null || _this$font7 === void 0 ? void 0 : _this$font7.attr('class', '').addClass('warning'); html ? (_this$font8 = this.font) === null || _this$font8 === void 0 ? void 0 : _this$font8.html(text) : (_this$font9 = this.font) === null || _this$font9 === void 0 ? void 0 : _this$font9.text(text); return this; }, info() { var _this$font10, _this$font11, _this$font12; let text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'Info'; let html = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; (_this$font10 = this.font) === null || _this$font10 === void 0 ? void 0 : _this$font10.attr('class', '').addClass('info'); html ? (_this$font11 = this.font) === null || _this$font11 === void 0 ? void 0 : _this$font11.html(text) : (_this$font12 = this.font) === null || _this$font12 === void 0 ? void 0 : _this$font12.text(text); return this; }, view() { var _this$font13; (_this$font13 = this.font) === null || _this$font13 === void 0 ? void 0 : _this$font13[0].scrollIntoView(); return this; } }; return status; } catch (error) { throwError(error, 'echoLog'); return emptyStatus; } }; const scripts_echoLog = echoLog; const unique = array => { try { return [ ...new Set(array) ]; } catch (error) { throwError(error, 'unique'); return []; } }; const delay = function() { let time = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1e3; return new Promise(resolve => { setTimeout(() => { resolve(true); }, time); }); }; const getRedirectLink = async link => { try { if (!link) { return null; } const redirectLinksCache = GM_getValue('redirectLinks') || {}; if (redirectLinksCache[link]) { redirectLinksCache[link]; } return await tools_httpRequest({ url: link, method: 'GET' }).then(_ref => { let { data } = _ref; if (data !== null && data !== void 0 && data.finalUrl) { redirectLinksCache[link] = data.finalUrl; GM_setValue('redirectLinks', redirectLinksCache); return data.finalUrl; } return null; }); } catch (error) { throwError(error, 'getRedirectLink'); return null; } }; const visitLink = async (link, options) => { try { const logStatus = scripts_echoLog({ type: 'visitLink', text: link }); return await tools_httpRequest({ url: link, method: 'GET', ...options }).then(_ref2 => { let { result, statusText, status } = _ref2; if (result === 'Success') { logStatus.success(); return true; } logStatus.error(`${result}:${statusText}(${status})`); return false; }); } catch (error) { throwError(error, 'visitLink'); return false; } }; const getUrlQuery = url => { try { const query = {}; if (url) { if (url.includes('?')) { url.split('?')[1].replace(/([^?&=]+)=([^&]+)/g, (str, key, value) => { query[key] = value; return str; }); } } else { window.location.search.replace(/([^?&=]+)=([^&]+)/g, (str, key, value) => { query[key] = value; return str; }); } return query; } catch (error) { throwError(error, 'getUrlQuery'); return {}; } }; const getUuid = () => { const uuidUrl = URL.createObjectURL(new Blob()).toString(); return uuidUrl.slice(uuidUrl.lastIndexOf('/') + 1); }; const stringToColour = str => { try { let hash = 0; for (let i = 0; i < str.length; i++) { hash = str.charCodeAt(i) + ((hash << 5) - hash); } let colour = '#'; for (let i = 0; i < 3; i++) { const value = hash >> i * 8 & 255; colour += `00${value.toString(16)}`.slice(-2); } return colour; } catch (error) { throwError(error, 'stringToColour'); return '#fff'; } }; const defaultGlobalOptions = { doTask: { discord: { servers: true }, instagram: { users: true }, twitch: { channels: true }, twitter: { users: true, retweets: true }, vk: { names: true }, youtube: { channels: true, likes: true }, reddit: { reddits: true }, steam: { groups: true, wishlists: true, follows: true, forums: true, workshops: true, curators: true, workshopVotes: true, announcements: true } }, undoTask: { discord: { servers: true }, instagram: { users: true }, twitch: { channels: true }, twitter: { users: true, retweets: true }, vk: { names: true }, youtube: { channels: true, likes: true }, reddit: { reddits: true }, steam: { groups: true, wishlists: true, follows: true, forums: true, workshops: true, curators: true } }, position: { buttonSideX: 'right', buttonSideY: 'top', buttonDistance: '15,30', showButtonSideX: 'right', showButtonSideY: 'top', showButtonDistance: '15,30', logSideX: 'right', logSideY: 'bottom', logDistance: '10,10' }, hotKey: { doTaskKey: 'alt + d', undoTaskKey: 'alt + u', toggleLogKey: 'alt + l' }, other: { twitterVerifyId: '783214', youtubeVerifyChannel: 'UCrXUsMBcfTVqwAS7DKg9C0Q', autoUpdateSource: 'jsDelivr', language: 'zh', checkLogin: true, checkLeftKey: true, defaultShowButton: true, defaultShowLog: true } }; const userDefinedGlobalOptions = GM_getValue('globalOptions') || {}; const assignObject = (obj1, obj2) => { try { const newObj = {}; for (const [ key, value ] of Object.entries(obj1)) { if (Object.prototype.toString.call(value) === '[object Object]' && Object.prototype.toString.call(obj2[key]) === '[object Object]') { newObj[key] = assignObject(value, obj2[key]); } else { newObj[key] = obj2[key] ?? value; } } return newObj; } catch (error) { throwError(error, 'assignObject'); return defaultGlobalOptions; } }; const globalOptions = assignObject(defaultGlobalOptions, userDefinedGlobalOptions); const saveData = () => { try { const data = {}; $('#globalOptionsForm').serializeArray().map(value => { data[value.name] = value.value; return value; }); $.makeArray($('#globalOptionsForm input')).map(element => { const name = $(element).attr('name'); const keys = name.split('.'); if (keys.length === 3) { globalOptions[keys[0]][keys[1]][keys[2]] = data[name] ? data[name] === 'on' ? true : data[name] : false; } else if (keys.length === 2) { globalOptions[keys[0]][keys[1]] = data[name] ? data[name] === 'on' ? true : data[name] : false; } return element; }); GM_setValue('globalOptions', globalOptions); external_Swal_default().fire({ title: i18n('changeGlobalOptionsSuccess'), icon: 'success' }); } catch (error) { throwError(error, 'saveData'); } }; const changeGlobalOptions = showType => { try { let globalOptionsForm = `
    `; for (const [ type, data1 ] of Object.entries(globalOptions)) { for (const [ option, data2 ] of Object.entries(data1)) { if ([ 'other', 'position', 'hotKey' ].includes(type)) { if (typeof data2 === 'boolean') { globalOptionsForm += `${Object.keys(data1).indexOf(option) === 0 ? `` : ''}`; } else { globalOptionsForm += `${Object.keys(data1).indexOf(option) === 0 ? `` : ''}`; } } else { for (const [ socialType, data3 ] of Object.entries(data2)) { globalOptionsForm += `${Object.keys(data1).indexOf(option) === 0 ? `` : ''}`; } } } } globalOptionsForm += '
    ${i18n('type')}${i18n('option')}${i18n('value')}
    ${i18n(type)}${i18n(option)}
    ${i18n(type)}${i18n(option)}
    ${i18n(type)}${option}.${i18n(socialType)}
    '; if (showType === 'swal') { external_Swal_default().fire({ title: i18n('globalOptions'), html: globalOptionsForm, showConfirmButton: true, confirmButtonText: i18n('save'), showCancelButton: true, cancelButtonText: i18n('close') }).then(_ref => { let { isConfirmed } = _ref; if (isConfirmed) { saveData(); } }); } else { $('body').append(`

    ${i18n('globalOptions')}

    ${globalOptionsForm}`); } } catch (error) { throwError(error, 'changeGlobalOptions'); } }; const data = { website: '网站', type: '类型', edit: '编辑', whiteList: '白名单', skipTask: '跳过撤销任务', whiteListOptions: '白名单设置', changeWhiteListOption: '设置白名单(%0)', whiteListNotFound: '找不到此项白名单: %0', changeWhiteListSuccess: '白名单修改成功,刷新生效!', changeWebsiteOptions: '网站设置', changeGlobalOptions: '全局设置', ok: '是', save: '保存', close: '关闭', return: '返回', option: '选项', value: '值', websiteOptions: '当前网站设置', changeWebsiteOptionsSuccess: '更改当前网站设置成功,刷新生效!', changeGlobalOptionsSuccess: '更改全局设置成功,刷新生效!', needLogin: '请先登录!', getTasksInfo: '正在获取并处理任务信息...', gettingKey: '正在获取Key...', verifyingTask: '正在验证任务', notice: '自动任务脚本提醒', noKeysLeft: '此页面已经没有剩余key了,是否关闭?', giveawayEnded: '此活动已结束,是否关闭?', giveawayNotWork: '此活动因某些原因(已结束/暂停/未开始...)不可用(如果是脚本误判请及时反馈),是否关闭?', confirm: '确定', cancel: '取消', unKnown: '未知', unKnownTaskType: '未识别的任务', doing: '正在做任务', allTasksComplete: '所有任务已完成!', getTaskIdFailed: '获取任务Id失败!', initSuccess: '%0 初始化成功!', initFailed: '%0 初始化失败!', errorLink: '链接错误: %0', needInit: '请先初始化', verifyingAuth: '正在验证%0凭证...', updatingAuth: '正在更新%0凭证...', initing: '正在初始化...', getFailed: '获取%0失败!', checkLoginFailed: '检测登录状态失败!', checkLeftKeyFailed: '检测剩余Key失败!', userId: '用户Id', joiningGiveaway: '正在加入赠Key', needJoinGiveaway: '需要先加入赠Key', cannotUndo: '此网站不支持取消任务', verifyAuth: '正在验证 %0 凭证...', closePageNotice: '如果此页面没有自动关闭,请自行关闭本页面。', errorReport: '检测到脚本报错,是否前往反馈BUG?', visitingLink: '正在访问链接: ', doTask: '做任务', undoTask: '撤销任务', verifyTask: '验证任务', getKey: '获取Key', selectAll: '全选', selectNone: '全不选', invertSelect: '反选', doFreeTask: '加入免费赠品', doPointTask: '加入点数赠品', skipTaskOption: '设置中已配置跳过任务', other: '其他', globalOptions: '全局设置', checkLogin: '登录检测
    需要登录的网站自动登录,部分本网站支持', checkLeftKey: '剩余Key检测
    赠Key活动结束提示是否关闭,部分本网站支持', twitterVerifyId: '通过尝试关注该账号验证Twitter凭证
    默认为Twitter官方帐号 783214', youtubeVerifyChannel: '通过尝试订阅该频道验证YouTube凭证
    默认为YouTube官方频道 UCrXUsMBcfTVqwAS7DKg9C0Q', autoUpdateSource: '更新源
    github: 需代理,实时更新
    jsdelivr: 可不用代理,更新有延迟
    auto: 首先使用github源更新,失败后尝试用jsdelivr源更新', saveGlobalOptions: '保存全局设置', settingPage: '设置页面', name: '名称', version: '版本', scriptManager: '脚本管理器', script: '脚本', environment: '环境', os: '系统', browser: '浏览器', getId: '获取 %0 id', getTwitterUserId: '获取Twitter用户id(获取id功能仅在设置页面可用)', getYoutubeChannelId: '获取Youtube频道id(获取id功能仅在设置页面可用)', showButton: '显示按钮', hideButton: '隐藏按钮', showLog: '显示日志', hideLog: '隐藏日志', defaultShowButton: '默认显示按钮', defaultShowLog: '默认显示日志', position: '组件位置', buttonSideX: '按钮区域水平方向定位(实时预览功能仅在设置页面可用)
    left: 靠左 | right: 靠右', buttonSideY: '按钮区域垂直方向定位(实时预览功能仅在设置页面可用)
    top: 靠上 | bottom: 靠下', buttonDistance: '按钮区域距边缘的距离(实时预览功能仅在设置页面可用)
    格式: X距离,Y距离', showButtonSideX: '显示按钮水平方向定位(实时预览功能仅在设置页面可用)
    left: 靠左 | right: 靠右', showButtonSideY: '显示按钮垂直方向定位(实时预览功能仅在设置页面可用)
    top: 靠上 | bottom: 靠下', showButtonDistance: '显示按钮距边缘的距离(实时预览功能仅在设置页面可用)
    格式: X距离,Y距离', logSideX: '日志区域水平方向定位(实时预览功能仅在设置页面可用)
    left: 靠左 | right: 靠右', logSideY: '日志区域垂直方向定位(实时预览功能仅在设置页面可用)
    top: 靠上 | bottom: 靠下', logDistance: '日志区域距边缘的距离(实时预览功能仅在设置页面可用)
    格式: X距离,Y距离', hotKey: '快捷键', doTaskKey: '做任务快捷键
    (实时预览功能仅在设置页面可用)', undoTaskKey: '撤销任务快捷键
    (实时预览功能仅在设置页面可用)', toggleLogKey: '显示/隐藏日志快捷键
    (实时预览功能仅在设置页面可用)', tasksHistory: '任务历史', clearHistory: '清空历史', clearHistoryFinished: '已清空任务历史!', deleteTask: '删除任务', lastChangeTime: '最后一次修改时间', clearTaskFinished: '删除以下任务完成!', clearTaskFailed: '删除任务失败,没有找到任务名!', syncData: '数据同步', settingData: '正在上传数据...', gettingData: '正在获取数据...', help: '帮助', fileName: '文件名', upload2gist: '同步到Gist', downloadFromGist: '从Gist同步', saveAndTest: '保存配置并测试', testSuccess: '测试成功!', testFailed: '测试失败!', saveAndTestNotice: '请先保存配置并测试!', processingData: '正在处理数据...', updatingData: '正在上传数据...', syncDataSuccess: '同步数据成功!', syncDataFailed: '同步数据失败,请在控制台查看错误信息!', downloadingData: '正在下载数据...', checkedNoData: '没有检测到远程数据,请确认配置是否正确!', savingData: '正在保存数据...', syncHistory: '同步任务历史', checkUpdateFailed: '检测更新失败', newVersionNotice: '检测到新版本V%0, 点此更新', language: '语言
    目前仅支持zh: 中文, en: 英文', gistOptions: 'Gist 设置', swalNotice: '检测到您第一次安装V4版本脚本,请前往阅读用前必读内容!', echoNotice: '检测到您第一次安装V4版本脚本,请点此前往阅读用前必读内容!', noticeLink: 'https://auto-task-doc.js.org/guide/#用前必读', toGithub: '前往Github反馈', toKeylol: '前往其乐论坛反馈', copySuccess: '错误信息已复制到剪切板,是否前往其乐论坛反馈?', copyFailed: '请复制下方错误信息后前往Keylol论坛反馈!', groups: '组', wishlists: '愿望单', follows: '游戏关注', forums: '论坛', workshops: '创意工坊收藏', curators: '鉴赏家', workshopVotes: '创意工坊点赞', announcements: '社区通知', steamCommunity: 'Steam社区', steamStore: 'Steam商店', needLoginSteamStore: '请先登录Steam商店', needLoginSteamCommunity: '请先登录Steam社区', joiningSteamGroup: '正在加入Steam组', leavingSteamGroup: '正在退出Steam组', gettingSteamGroupId: '正在获取Steam组Id', subscribingForum: '正在订阅Steam论坛', unsubscribingForum: '正在取消订阅Steam论坛', gettingForumId: '正在获取Steam论坛Id', followingCurator: '正在关注Steam鉴赏家', unfollowingCurator: '正在取关Steam鉴赏家', addingToWishlist: '正在添加游戏到Steam愿望单', removingFromWishlist: '正在从Steam愿望单移除游戏', followingGame: '正在关注Steam游戏', unfollowingGame: '正在取关Steam游戏', favoritingWorkshop: '正在收藏Steam创意工坊物品', unfavoritingWorkshop: '正在取消收藏Steam创意工坊物品', gettingWorkshopAppId: '正在获取Steam创意工坊物品Id', votingUpWorkshop: '正在点赞Steam创意工坊物品', gettingAnnouncementParams: '正在获取Steam通知信息', likingAnnouncement: '正在点赞Steam通知', changingArea: '正在更换Steam地区: %0...', notNeededChangeArea: '当前地区不需要更换', noAnotherArea: '请检测是否开启正确开启代理', gettingAreaInfo: '正在获取Steam地区信息...', changeAreaNotice: '疑似锁区游戏,尝试换区执行', steamFinishNotice: 'Steam任务完成,尝试将购物车地区换回CN', servers: '服务器', joiningDiscordServer: '正在加入Discord服务器', leavingDiscordServer: '正在退出Discord服务器', gettingDiscordGuild: '正在获取Discord服务器Id', users: '用户', loginIns: '请先登录Instagram', insBanned: '您的Instagram账户已被封禁', verifyingInsAuth: '正在验证Instagram凭证...', gettingInsUserId: '正在获取Instagram用户Id', followingIns: '正在关注Instagram用户', unfollowingIns: '正在取关Instagram用户', reddits: '社区/用户', loginReddit: '请先登录Reddit', changingRedditVersion: '正在切换Reddit为新版页面...', joiningReddit: '正在加入Reddit社区', leavingReddit: '正在退出Reddit社区', followingRedditUser: '正在关注Reddit用户', unfollowingRedditUser: '正在取关Reddit用户', channels: '频道', followingTwitchChannel: '正在关注Twitch频道', unfollowingTwitchChannel: '正在取关Twitch频道', gettingTwitchChannelId: '正在获取Twitch频道Id', twitterUser: '推特用户', retweets: '转推', followingTwitterUser: '正在关注推特用户', unfollowingTwitterUser: '正在取关推特用户', retweetting: '正在转推', unretweetting: '正在撤销转推', names: '组/社区/动态', loginVk: '请先登录Vk', gettingVkId: '正在获取Vk任务Id', joiningVkGroup: '正在加入Vk组', leavingVkGroup: '正在退出Vk组', joiningVkPublic: '正在加入Vk社区', leavingVkPublic: '正在退出Vk社区', sendingVkWall: '正在转发Vk动态', deletingVkWall: '正在撤销转发Vk动态', youtubeChannel: 'YouTube频道', likes: '点赞', loginYtb: '请先登录YouTube', tryUpdateYtbAuth: '请尝试更新YouTube凭证', gettingYtbToken: '正在获取YouTube Token...', followingYtbChannel: '正在订阅YouTube频道', unfollowingYtbChannel: '正在退订YouTube频道', likingYtbVideo: '正在点赞YouTube视频', unlikingYtbVideo: '正在取消点赞YouTube视频', giveKeyNoticeBefore: '每次验证间隔15s', giveKeyNoticeAfter: '如果没有key, 请在https://givekey.ru/profile查看', noPoints: '点数不够,跳过抽奖', getNeedPointsFailed: '获取所需点数失败,跳过抽奖', joiningLottery: '正在加入抽奖', doingGleamTask: '正在做Gleam任务...', gettingGleamLink: '正在获取Gleam任务链接...', gleamTaskNotice: '如果此页面长时间未关闭,请完成任一任务后自行关闭!', verifiedGleamTasks: '已尝试验证所有任务,验证失败的任务请尝试手动验证或完成!', SweepWidgetNotice: '正在处理并验证任务,每次验证任务有1~3s间隔防止触发验证过快警告...' }; const zh_CN = data; const en_US_data = { website: 'Website', type: 'Type', edit: 'Edit', whiteList: 'Whitelist', skipTask: 'Skip undo task', whiteListOptions: 'Whitelist options', changeWhiteListOption: 'Whitelist option(%0)', whiteListNotFound: 'Cannot find this whitelist: %0', changeWhiteListSuccess: 'The whitelist is successfully modified, and the page refresh will take effect!', changeWebsiteOptions: 'Website options', changeGlobalOptions: 'Global options', ok: 'OK', save: 'Save', close: 'Close', return: 'Return', option: 'Option', value: 'Value', websiteOptions: 'Current website settings', changeWebsiteOptionsSuccess: 'The current website setting is changed successfully, and the page refresh will take effect!', changeGlobalOptionsSuccess: 'The global setting is changed successfully, and the refresh will take effect!', needLogin: 'Please log in first!', getTasksInfo: 'Obtaining and processing task information...', gettingKey: 'Getting Key...', verifyingTask: 'Verifying task', notice: 'Automatic task script notice', noKeysLeft: 'There are no more keys left on this page. Do you want to close it?', giveawayEnded: 'This event has ended, do you want to close it?', giveawayNotWork: 'This activity is unavailable for some reasons (ended/suspended/not started...)' + ' (if it is a script misjudgment, please give us feedback in time), is it closed?', confirm: 'Confirm', cancel: 'Cancel', unKnown: 'Unknown', unKnownTaskType: 'Unrecognized task', doing: 'Doing a task', allTasksComplete: 'All tasks have been completed!', getTaskIdFailed: 'Failed to obtain task Id!', initSuccess: '%0 was initialized successfully!', initFailed: '%0 initialization failed!', errorLink: 'Link error: %0', needInit: 'Please initialize first', verifyingAuth: 'Verifying %0 token...', updatingAuth: 'Update %0 token...', initing: 'Initializing...', getFailed: 'Failed to get %0!', checkLoginFailed: 'Failed to detect login status!', checkLeftKeyFailed: 'Failed to detect the remaining keys!', userId: 'User Id', joiningGiveaway: 'Joining giveaway', needJoinGiveaway: 'Need to join the giveaway first', cannotUndo: 'This website does not support canceling tasks', verifyAuth: 'Verifying %0 token...', closePageNotice: 'f this page does not close automatically, please close this page yourself.', errorReport: 'A script error is detected, do you want to report the BUG?', visitingLink: 'Visiting link: ', doTask: 'DoTask', undoTask: 'UndoTask', verifyTask: 'Verify', getKey: 'GetKey', selectAll: 'SelectAll', selectNone: 'SelectNone', invertSelect: 'InvertSelect', doFreeTask: 'FreeTask', doPointTask: 'PointTask', skipTaskOption: 'Skip task has been configured in the settings', other: 'Other', globalOptions: 'Global Options', checkLogin: 'Login detection
    Need to log in to the website automatically log in, part of this website supports.', checkLeftKey: 'Key remaining detection
    The end of the giveaway event prompts whether to close or not, part of this website supports.', twitterVerifyId: 'Verify Twitter token by trying to follow the account.
    The default is the official Twitter account 783214.', youtubeVerifyChannel: 'Verify YouTube token by trying to subscribe to the channel.
    ' + 'The default is the official YouTube channel UCrXUsMBcfTVqwAS7DKg9C0Q.', autoUpdateSource: 'The source to update
    github: Fast update.
    ' + 'jsdelivr: Update is delayed
    auto: First use github source to update, after failure, try to update with jsdelivr source.', saveGlobalOptions: 'Save global settings', settingPage: 'Setting Page', name: 'Name', version: 'Version', scriptManager: 'Script Manager', script: 'Script', environment: 'Environment', os: 'OS', browser: 'Browser', getId: 'Get %0 id', getTwitterUserId: 'Get Twitter user id (Get id function is only available on the settings page).', getYoutubeChannelId: 'Get Youtube channel id (Get id function is only available on the settings page).', showButton: 'ShowButton', hideButton: 'HideButton', showLog: 'ShowLog', hideLog: 'HideLog', defaultShowButton: 'Default display button', defaultShowLog: 'Display log by default', position: 'Component position', buttonSideX: 'Horizontal positioning of the button area (real-time preview function is only available on the setting page).' + '
    left: left | right: right', buttonSideY: 'The button area is positioned in the vertical direction (real-time preview function is only available on the settings page).' + '
    top: top | bottom: bottom', buttonDistance: 'The distance between the button area and the edge (the real-time preview function is only available on the setting page).' + '
    Format: X distance, Y distance', showButtonSideX: 'ShowButton horizontal positioning (real-time preview function is only available on the setting page).' + '
    left: left | right: right', showButtonSideY: 'ShowButton vertical positioning (real-time preview function is only available on the setting page).' + '
    top: top | bottom: bottom', showButtonDistance: 'The distance between the ShowButton and the edge (real-time preview function is only available on the setting page).' + '
    Format: X distance, Y distance', logSideX: 'Horizontal positioning of the log area (real-time preview function is only available on the setting page).' + '
    left: left | right: right', logSideY: 'Vertical positioning of the log area (real-time preview function is only available on the setting page).' + '
    top: top | bottom: bottom', logDistance: 'The distance between the log area and the edge (the real-time preview function is only available on the setting page).' + '
    Format: X distance, Y distance', hotKey: 'Shortcut key', doTaskKey: 'DoTask shortcut keys
    (real-time preview function is only available on the settings page).', undoTaskKey: 'UndoTask shortcut keys
    (real-time preview function is only available on the settings page).', toggleLogKey: 'ShowLog/HideLog shortcut keys
    (real-time preview function is only available on the settings page).', tasksHistory: 'Tasks history', clearHistory: 'Clear history', clearHistoryFinished: 'The mission history has been cleared!', deleteTask: 'Delete task', lastChangeTime: 'Last Change Time', clearTaskFinished: 'Delete the following tasks completed!', clearTaskFailed: 'Failed to delete the task, the task name was not found!', syncData: 'Data synchronization', settingData: 'Uploading data...', gettingData: 'Getting data...', help: 'Help', fileName: 'Filename', upload2gist: 'Sync to Gist', downloadFromGist: 'Sync from Gist', saveAndTest: 'Save configuration and test', testSuccess: 'Test success!', testFailed: 'Test failed!', saveAndTestNotice: 'Please save the configuration and test first!', processingData: 'Processing data...', updatingData: 'Uploading data...', syncDataSuccess: 'Synchronized data successfully!', syncDataFailed: 'Failed to synchronize data, please check the error message on the console!', downloadingData: 'Downloading data...', checkedNoData: 'No remote data is detected, please confirm whether the configuration is correct!', savingData: 'Saving data...', syncHistory: 'Synchronize tasks history', checkUpdateFailed: 'Check update failed', newVersionNotice: 'Checked a new version V%0, click to update', language: 'Language
    Currently only supports zh: Chinese, en: English', gistOptions: 'Gist Settings', swalNotice: 'It is detected that you are installing the V4 version script for the first time' + ', please go to read the READ ME FIRST content before use!', echoNotice: 'It is detected that you are installing the V4 version script for the first time' + ', please click here to read the READ ME FIRST content before use!', noticeLink: 'https://auto-task-doc.js.org/en/guide/#read-me-first', toGithub: 'Feedback(Github)', toKeylol: 'Feedback(Keylol)', copySuccess: 'The error message has been copied to the clipboard. Do you want to go to the Keylol forum to give feedback?', copyFailed: 'Please copy the error information below and report back to the Keylol forum!', groups: 'Group', wishlists: 'Wishlist', follows: 'Follow Game', forums: 'Forum', workshops: 'Favorite Workshop', curators: 'Curator', workshopVotes: 'Voteup Workshop', announcements: 'Announcement', steamCommunity: 'Steam Community', steamStore: 'Steam Store', needLoginSteamStore: 'Please log in to the Steam Store', needLoginSteamCommunity: 'Please log in to the Steam Community', joiningSteamGroup: 'Joining Steam Group', leavingSteamGroup: 'Leaving Steam Group', gettingSteamGroupId: 'Getting Steam Group Id', subscribingForum: 'Subscribing the Steam Forum', unsubscribingForum: 'Unsubscribing the Steam Forum', gettingForumId: 'Getting Steam Forum Id', followingCurator: 'Following Steam Curator', unfollowingCurator: 'Unfollowing Steam Curator', addingToWishlist: 'Adding the game to the Steam wishlist', removingFromWishlist: 'Removing the game from the Steam wishlist', followingGame: 'Following Steam games', unfollowingGame: 'Unfollowing Steam games', favoritingWorkshop: 'Favouring Steam Workshop Items', unfavoritingWorkshop: 'Unfavoriting Steam Workshop Items', gettingWorkshopAppId: 'Getting Steam Workshop Item Id', votingUpWorkshop: 'Liking Steam workshop items', gettingAnnouncementParams: 'Getting Steam announcement information', likingAnnouncement: 'Liking Steam announcement', changingArea: 'Changing Steam area: %0...', notNeededChangeArea: 'The current area does not need to be changed', noAnotherArea: 'Please check whether the proxy is turned on correctly', gettingAreaInfo: 'Getting Steam area information...', changeAreaNotice: 'Suspected of a locked zone game, try to change the zone to execute', steamFinishNotice: 'Steam task completed, try to change the shopping cart area back to CN', servers: 'Server', joiningDiscordServer: 'Joining Discord Server', leavingDiscordServer: 'Leaving Discord Server', gettingDiscordGuild: 'Getting Discord server Id', users: 'User', loginIns: 'Please log in to Instagram', insBanned: 'Your Instagram account has been banned', verifyingInsAuth: 'Verifying Instagram token...', gettingInsUserId: 'Getting Instagram user Id', followingIns: 'Following Instagram user', unfollowingIns: 'Unfollowing Instagram user', reddits: 'Reddit/User', loginReddit: 'Please log in to Reddit', changingRedditVersion: 'Switching Reddit to a new version page...', joiningReddit: 'Joining the Reddit', leavingReddit: 'Leaving the Reddit', followingRedditUser: 'Following Reddit User', unfollowingRedditUser: 'Unfollowing Reddit User', channels: 'Channel', followingTwitchChannel: 'Following Twitch Channel', unfollowingTwitchChannel: 'Unfollowing Twitch Channel', gettingTwitchChannelId: 'Getting Twitch Channel Id', twitterUser: 'Twitter User', retweets: 'Retweet', followingTwitterUser: 'Following Twitter User', unfollowingTwitterUser: 'Unfollowing Twitter User', retweetting: 'Retweeting', unretweetting: 'Unretweeting', names: 'Group/Public/Wall', loginVk: 'Please log in to Vk', gettingVkId: 'Getting Vk task Id', joiningVkGroup: 'Joining Vk Group', leavingVkGroup: 'Leaving Vk Group', joiningVkPublic: 'Joining Vk Public', leavingVkPublic: 'Leaving Vk Public', sendingVkWall: 'Sending Vk Wall', deletingVkWall: 'Deleting Vk Wall', youtubeChannel: 'YouTube Channel', likes: 'Like', loginYtb: 'Please log in to YouTube', tryUpdateYtbAuth: 'Please try to update YouTube token', gettingYtbToken: 'Getting YouTube Token...', followingYtbChannel: 'Subscribing to YouTube channel', unfollowingYtbChannel: 'Unsubscribing to YouTube channel', likingYtbVideo: 'Liking YouTube video', unlikingYtbVideo: 'Unliking YouTube video', giveKeyNoticeBefore: 'Each verification interval is 15s', giveKeyNoticeAfter: 'If there is no key, please check at https://givekey.ru/profile', noPoints: 'Not enough points, skip the lottery', getNeedPointsFailed: 'ailed to obtain the required points, skip the lottery', joiningLottery: 'Joining the lottery', doingGleamTask: 'Doing Gleam Task...', gettingGleamLink: 'Getting Gleam task link...', gleamTaskNotice: 'If this page has not been closed for a long time, please close it yourself after completing any task!', verifiedGleamTasks: 'Attempted to verify all tasks. If the verification fails, please try to verify manually or complete it!', SweepWidgetNotice: 'The task is being processed and verified. ' + 'There is an interval of 1~3s for each verification task to prevent the triggering of too fast verification warning...' }; const en_US = en_US_data; const languages = { zh: zh_CN, en: en_US }; const language = [ 'zh', 'en' ].includes(globalOptions.other.language) ? globalOptions.other.language : 'en'; const I18n = function(key) { var _languages$language; for (var _len = arguments.length, argvs = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { argvs[_key - 1] = arguments[_key]; } if (!((_languages$language = languages[language]) !== null && _languages$language !== void 0 && _languages$language[key])) { return key; } return languages[language][key].replace(/%([\d]+)/g, (match, index) => argvs[parseInt(index, 10)]); }; const i18n = I18n; function throwError(error, name) { external_Swal_default().fire({ title: i18n('errorReport'), icon: 'error', showCancelButton: true, confirmButtonText: i18n('toGithub'), showDenyButton: true, denyButtonText: i18n('toKeylol'), cancelButtonText: i18n('close') }).then(_ref => { let { isDenied, isConfirmed } = _ref; if (isConfirmed) { window.open(`https://github.com/HCLonely/auto-task-v4/issues/new?title=${encodeURIComponent(`脚本报错: ${name}`)}&labels=bug&body=${encodeURIComponent(`错误链接: [${window.location.href}](${window.location.href}) 环境: \`\`\` ${JSON.stringify((0, javascript_utils_umd_min.ua)(), null, 4)} \`\`\` 脚本管理器: \`${GM_info.scriptHandler} ${GM_info.version}\` 脚本版本: \`${GM_info.script.version}\` 报错信息: \`\`\` ${error.stack} \`\`\` 执行日志: \`\`\` ${$.makeArray($('#auto-task-info>li')).map(element => element.innerText).join('\n')} \`\`\` `)}`, '_blank'); } else if (isDenied) { const text = `错误链接: [url=${window.location.href}]${window.location.href}[/url] 环境: [code]${JSON.stringify((0, javascript_utils_umd_min.ua)(), null, 4)}[/code] 脚本管理器: ${GM_info.scriptHandler} ${GM_info.version} 脚本版本: ${GM_info.script.version} 报错信息: [code]${error.stack}[/code] 执行日志: [code]${$.makeArray($('#auto-task-info>li')).map(element => element.innerText).join('\n')}[/code]`; const textarea = $('