Created
August 28, 2020 20:24
-
-
Save benjclark/f68fecacfb4b5744acb6c09db59ed46d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| t.forEach((function(e) { | |
| var t = e.getAttribute("ms-field") || e.getAttribute("data-ms-member"); | |
| if ("email" !== t && "password" !== t) { | |
| t = t.replace(/[^a-zA-Z\s]+/g, "-").toLowerCase(); | |
| var r = e.getAttribute("type"); | |
| if ("checkbox" === r) | |
| o[t] = e.checked; | |
| else if ("radio" === r) { | |
| var n = e.getAttribute("name"); | |
| if (!i[n]) { | |
| var a = document.querySelector("input[name=" + n + "]:checked"); | |
| a && (o[t] = a.value), | |
| i[n] = !0 | |
| } | |
| } else | |
| o[t] = e.value | |
| } | |
| } | |
| )), |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment