Add debug button to speed up account creation

This commit is contained in:
jvyden 2022-03-03 17:33:06 -05:00
commit 37e6bb159e
No known key found for this signature in database
GPG key ID: 18BCF2BE0262B278

View file

@ -79,3 +79,30 @@
<input type="submit" value="Register" id="submit" class="ui green button"> <input type="submit" value="Register" id="submit" class="ui green button">
</form> </form>
<br><br>
@if (ServerStatics.IsDebug)
{
<button class="ui red button" onclick="fill()">DEBUG: Fill with everything but email</button>
<script>
const usernameField = document.getElementById("text");
const emailField = document.getElementById("emailAddress");
const passwordField = document.getElementById("password");
const confirmPasswordField = document.getElementById("confirmPassword");
function fill() {
const min = 100;
const max = 99999999;
const rand = Math.floor(Math.random() * (max - min + 1) + min);
usernameField.value = rand.toString();
passwordField.value = rand.toString();
confirmPasswordField.value = rand.toString();
emailField.focus();
}
</script>
}