<p></p>
<p dir="auto">Hi all,</p>
<p dir="auto">I'm very happy to see a lot of constructive criticism here, so I updated the code.</p>
<ol dir="auto">
<li>I moved all the code to 'users.js'</li>
<li>Used some JQuery, which significantly shortens the code</li>
<li>I also added in a light check for special characters</li>
<li>Added comments about some of the questions that were raised here, so that those issues are clear for future readers of the code.</li>
</ol>
<p dir="auto">About the syntax: if this improves matters for 99% of the new signups, that is a good step in the right direction. If the script doesn't work (e.g. for people using scriptblockers), they can still sign up and the display name will still be validated by the server. For those, the situation will stay as it is.</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/4402#issuecomment-1853925151">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLONFBBEGLSKGAKG6X3YJGU6BAVCNFSM6AAAAABASNZGVCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJTHEZDKMJVGE">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLKXKQUPSXMPUHIXMZLYJGU6BA5CNFSM6AAAAABASNZGVCWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTOQCTR6.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/openstreetmap-website/pull/4402/c1853925151</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/4402#issuecomment-1853925151",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/4402#issuecomment-1853925151",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>