[BACK]Return to form.min.js CVS log [TXT][DIR] Up to [local] / draft

Diff for /draft/form.min.js between version 1.91 and 1.92

version 1.91, 2024/03/31 16:26:26 version 1.92, 2024/03/31 16:35:25
Line 43  async function sendData() {
Line 43  async function sendData() {
         if(erro) {          if(erro) {
                 info.textContent="One or more fields have an error. Please check and try again."                  info.textContent="One or more fields have an error. Please check and try again."
         } else {          } else {
                 var fcon = document.querySelectorAll(".wpcf7-form-control");                  var fcon = document.querySelectorAll(".wpcf7-form-control"),
                           id = "(NULL)";
   
                 info.textContent="Please wait..."                  info.textContent="Please wait..."
                 fcon.forEach((f) => {                  fcon.forEach((f) => {
Line 59  async function sendData() {
Line 60  async function sendData() {
                                 sitekey: '0x4AAAAAAAVpXFEy152AON1L',                                  sitekey: '0x4AAAAAAAVpXFEy152AON1L',
                                 'error-callback': function(e) {                                  'error-callback': function(e) {
                                         info.textContent="Cloudflare Turnstile verification error. Try again later."                                          info.textContent="Cloudflare Turnstile verification error. Try again later."
                                         turnstile.remove();  
                                 },                                  },
                                 callback: function(token) {                                  callback: function(token) {
                                         const data = JSON.stringify({"add": mail, "sub": subj, "msg": mess, "tok": token});                                          info.textContent=token;
                                         info.textContent="Sending...";  //                                      const data = JSON.stringify({"add": mail, "sub": subj, "msg": mess, "tok": token});
                                         fetch("/feedbk/", {  //                                      info.textContent="Sending...";
                                                 headers: { "Content-Type": "application/json" },  //                                      fetch("/feedbk/", {
                                                 credentials: "same-origin",  //                                              headers: { "Content-Type": "application/json" },
                                                 mode: "same-origin",  //                                              credentials: "same-origin",
                                                 method: "post",  //                                              mode: "same-origin",
                                                 body: data  //                                              method: "post",
                                         })  //                                              body: data
                                         .then(response => response.json())  //                                      })
                                         .then(json => info.textContent=json['msg'])  //                                      .then(response => response.json())
                                 }  //                                      .then(json => info.textContent=json['msg'])
                                   };
                         });                          });
                         turnstile.remove();  //                                      turnstile.remove();
                 });                  });
         };          };
 }  }

Legend:
Removed from v.1.91  
changed lines
  Added in v.1.92

https://cvs.kroczynski.net