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

The same content is in 34 releases, WordPress 7.0-beta4 to 7.1.5. See them all, or every version of this file.