From 986f13ef1a9280a415f3882b25dd6596f0209ff7 Mon Sep 17 00:00:00 2001 From: Ilya Daynatovich Date: Mon, 5 Dec 2016 13:02:31 +0200 Subject: [PATCH] Made editions in PR --- modules/UI/welcome_page/WelcomePage.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/modules/UI/welcome_page/WelcomePage.js b/modules/UI/welcome_page/WelcomePage.js index 775f2a37c..42057b91b 100644 --- a/modules/UI/welcome_page/WelcomePage.js +++ b/modules/UI/welcome_page/WelcomePage.js @@ -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(); } });