version 1.90, 2024/03/31 16:24:59 |
version 1.101, 2024/04/02 07:14:55 |
|
|
const form = document.querySelector("#cform"); |
const form = document.querySelector("#cform"); |
|
|
function parseString(str) { |
function parseString(str) { |
return str.replace(/[~`!@#$%^&*(){}\[\];:"'<,.>?\/\\|+=-]/g, '_'); |
// return str.replace(/[~`!@#$%^&*(){}\[\];:"'<,.>?\/\\|+=-]/g, '_'); |
|
return str.replace(/[~]/g, '_'); |
} |
} |
|
|
function parseMail(email) { |
function parseMail(email) { |
Line 45 async function sendData() { |
|
Line 46 async function sendData() { |
|
} else { |
} else { |
var fcon = document.querySelectorAll(".wpcf7-form-control"); |
var fcon = document.querySelectorAll(".wpcf7-form-control"); |
|
|
info.textContent="Please wait..." |
info.textContent="Verifying..." |
fcon.forEach((f) => { |
fcon.forEach((f) => { |
f.disabled=true; |
f.disabled=true; |
l=f; |
l=f; |
Line 58 async function sendData() { |
|
Line 59 async function sendData() { |
|
'response-field': false, |
'response-field': false, |
sitekey: '0x4AAAAAAAVpXFEy152AON1L', |
sitekey: '0x4AAAAAAAVpXFEy152AON1L', |
'error-callback': function(e) { |
'error-callback': function(e) { |
info.textContent="Cloudflare Turnstile verification error. Try again later." |
info.textContent="Verification error. Try again later."; |
turnstile.remove(); |
turnstile.remove(); |
}, |
}, |
callback: function(token) { |
callback: function(token) { |
Line 73 async function sendData() { |
|
Line 74 async function sendData() { |
|
}) |
}) |
.then(response => response.json()) |
.then(response => response.json()) |
.then(json => info.textContent=json['msg']) |
.then(json => info.textContent=json['msg']) |
.then(turnstile.remove();) |
.then(turnstile.remove()); |
} |
} |
}); |
}); |
}); |
}); |