Last active
December 2, 2022 19:01
-
-
Save nidotls/f050823b3abe3f4e57f041f8bd8056f0 to your computer and use it in GitHub Desktop.
Replaces the underscores in the Tebex username with spaces to allow both forms of the name.
This file contains 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
<form method="post" id="username-form" onsubmit="return submitUsernameForm(event)"> | |
<div class="username"> | |
<div class="input-group"> | |
<input type="text" name="ign" class="form-control input-lg form-control-lg"> | |
<div class="input-group-append input-group-btn"> | |
<button class="btn btn-success btn-lg" type="submit">Fortfahren<i class="fa fa-chevron-right ml-2" style="margin-left:10px;"></i></button> | |
</div> | |
</div> | |
</div> | |
</form> | |
<script> | |
function submitUsernameForm(event) { | |
if(!$("input[name=ign]").val().includes("_")) { | |
return true; | |
} | |
event.preventDefault(); | |
$("input[name=ign]").val($("input[name=ign]").val().replace(/\_/g, " ")) | |
$("#username-form").submit(); | |
return false; | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment