-
Notifications
You must be signed in to change notification settings - Fork 45
Expand file tree
/
Copy pathinvitesToAllProfileViewes.js
More file actions
48 lines (44 loc) · 964 Bytes
/
Copy pathinvitesToAllProfileViewes.js
File metadata and controls
48 lines (44 loc) · 964 Bytes
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
44
45
46
47
48
function grouped(e, n) {
if (e != null) {
return e[n].toString();
} else {
return "";
}
}
function validate(e, n, t) {
if (e != null) {
if (e.length > (n)) {
if (t == "href") {
return e[n].href;
}
if (t == "innerText") {
return e[n].innerText;
}
if (t == "innerHTML") {
return e[n].innerHTML;
}
if (t = 'next') {
return e[n];
}
}
} else {
return '';
}
}
var profContainer = document.getElementsByTagName("article");
var connAvail = [];
for (i = 1; i < (profContainer.length); i++) {
var connBtn = validate(profContainer[i].getElementsByTagName("button"),1,"innerText");
if(/Connect/.test(connBtn) === true){
connAvail.push(i);
}
}
function inviteThemAll(elmNum, timr){
setTimeout(() => {
profContainer[elmNum].getElementsByTagName("button")[1].click();
},timr);
}
for(b in connAvail){
var ct = b*333;
inviteThemAll(connAvail[b], ct);
}