Skip to content

Commit ef475e1

Browse files
authored
v1.4.3: 提升速度
1 parent 77ad9a8 commit ef475e1

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

tsdmAutoSignAndWork.user.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// ==UserScript==
22
// @name 天使动漫自动签到打工
33
// @namespace https://github.com/jc3213/userscript
4-
// @version 1.4.2
4+
// @version 1.4.3
55
// @description 天使动漫全自动打工签到脚本 — 完全自动无需任何操作,只需静待一分钟左右
66
// @author jc3213
7-
// @match *://*.tsdm39.com/*
7+
// @match *://www.tsdm39.com/*
88
// @noframes
99
// ==/UserScript==
1010

@@ -76,12 +76,13 @@ async function autoWork() {
7676
}
7777
else {
7878
popup.innerText = '开始打工...';
79-
iframe.document.querySelectorAll('#advids > div > a').forEach(async(a, i) => {
79+
let index = 0;
80+
for (let a of iframe.document.querySelectorAll('#advids > div > a')) {
8081
a.removeAttribute('href');
8182
a.removeAttribute('target');
82-
await sleep(i * 300);
83+
await sleep(index++ * 300);
8384
a.click();
84-
});
85+
}
8586
await sleep(3000);
8687
iframe.document.querySelector('#stopad > a').click();
8788
text = '已完成打工';

0 commit comments

Comments
 (0)