-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
41 lines (38 loc) · 1018 Bytes
/
index.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
(function() {
// Select newsletter by default
document.querySelector("input[type=checkbox]").click();
// Initialize donate
Donate({
container: ".donate"
, prefix: "$"
, classes: {
active: "active"
}
, amounts: [
50
, 100
, 250
, 500
, 1000
, 2400
, 5000
]
, custom: true
, format: function (val) {
return val > 1000
? (val = val.toString()).substring(0, 1) + "," + val.substring(1)
: val
;
}
, onChange: function (val, li, e) {
document.querySelector("[name=amount]").value = val;
}
});
// Checking for sent ok
var interval = setInterval(function() {
if (document.querySelector("#content .wpcf7-mail-sent-ok")) {
document.querySelector("#paypal-form").submit();
clearInterval(interval);
}
}, 100);
})();