forked from avinal/resume
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpic.js
43 lines (31 loc) · 1012 Bytes
/
pic.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// scroll
let currNodes = document.querySelectorAll('div.harvester.stream');
let queue = [];
for (let index = 0; index < currNodes.length; index++) {
const element = currNodes[index];
if(queue.includes(element)){
// has it, ignore
continue;
}else{
//not found
queue.push(element)
}
}
window.addEventListener('scroll', () => {
for (const e of document.querySelectorAll('div.harvester.stream.downloaded:not(.clicked)')) {
// 你要確定 e 真的是會下載的那個按鈕
e.click()
e.classList.add('clicked')
}
})
window.addEventListener('scroll', () => {
[...document.querySelectorAll('div.harvester.stream:not(.success):not(.downloaded)')].forEach((e) => e.click())
})
setTimeout((e) => {
for (let index = 0; index < 100; index++) {
window.scrollBy(0,500);
}
}, 200);
window.addEventListener('scroll', () => {
[...document.querySelectorAll('div.harvester.stream'))].forEach((e) => e.click())
})