mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2025-06-16 19:35:24 +02:00
Very basic proof of concept, able to post and recieve messages
This commit is contained in:
21
templates/set_username.html
Normal file
21
templates/set_username.html
Normal file
@ -0,0 +1,21 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post">
|
||||
<h1>Set username:<h1>
|
||||
<input type="text" name="username" id="username" required>
|
||||
</form>
|
||||
<script>
|
||||
$("input").keypress(function(event) {
|
||||
var content = $('#username').val();
|
||||
if (event.which == 13 && /\S/.test(content)) {
|
||||
event.preventDefault();
|
||||
$("form").submit();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<body>
|
||||
</html>
|
Reference in New Issue
Block a user