chat-room-change.js 533 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
var ChatRoomChange = {};

document.addEventListener("DOMContentLoaded", function () {
  // ルーム名変更イベント
  $(".change_room_name_btn button").click(function () {
    $("form").submit();
  });
});

$("#roomNameChangeBtn").click(function () {
  var changeRoomName = $("#roomNameInput").val();
  var trimmedRoomName = $("#roomNameInput").val().trim();
  if (trimmedRoomName.length == 0) {
    alert(getLocalizedString("error_empty_room_name"));
    return;
  }
  NativeBridgeDelegate.changeRoomName(changeRoomName);
});