CoreFiles by mySites.guru
view.min.js1 lines, 827 bytes, from wordpress-6.8.zip
Raw History Compare with 6.7.12
md5
b9228a18878ec1747be62b262ecf977d
sha1
c455b979b9f3b1aede48fb67c89f7b4567b36881
sha256
06eaa8000862df3c7cb9b3e598c29d9b1d1d425e077b72868f4f5bd6ec37a057
let t;try{t=JSON.parse(document.getElementById("wp-script-module-data-@wordpress/block-library/form/view")?.textContent)}catch{}document.querySelectorAll("form.wp-block-form").forEach((function(o){if(!t||!o.action||!o.action.startsWith("mailto:"))return;const e=t=>{const o=new URLSearchParams(window.location.search);o.append("wp-form-result",t),window.location.search=o.toString()};o.addEventListener("submit",(async function(r){r.preventDefault();const n=Object.fromEntries(new FormData(o).entries());n.formAction=o.action,n._ajax_nonce=t.nonce,n.action=t.action,n._wp_http_referer=window.location.href,n.formAction=o.action;try{(await fetch(t.ajaxUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams(n).toString()})).ok?e("success"):e("error")}catch(t){e("error")}}))}));

The same content is in 45 releases, WordPress 6.8-beta1 to 6.9.12. See them all, or every version of this file.