Made editions in PR
This commit is contained in:
parent
83dd56d34c
commit
986f13ef1a
|
@ -7,10 +7,12 @@ import UIUtil from '../util/UIUtil';
|
|||
|
||||
var animateTimeout, updateTimeout;
|
||||
|
||||
function enter_room() {
|
||||
var val = $("#enter_room_field").val();
|
||||
function enterRoom() {
|
||||
const $enterRoomField = $("#enter_room_field");
|
||||
|
||||
var val = $enterRoomField.val();
|
||||
if(!val) {
|
||||
val = $("#enter_room_field").attr("room_name");
|
||||
val = $enterRoomField.attr("room_name");
|
||||
}
|
||||
if (val) {
|
||||
window.location.pathname = "/" + val;
|
||||
|
@ -68,12 +70,12 @@ function setupWelcomePage() {
|
|||
}
|
||||
|
||||
$("#enter_room_button").click(function() {
|
||||
enter_room();
|
||||
enterRoom();
|
||||
});
|
||||
|
||||
$("#enter_room_field").keydown(function (event) {
|
||||
if (event.keyCode === 13 /* enter */) {
|
||||
enter_room();
|
||||
enterRoom();
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue