feathermost/js/main.js

25 lines
813 B
JavaScript
Raw Normal View History

2020-03-25 17:05:25 +01:00
"use strict";
2020-03-24 22:47:39 +01:00
2020-03-31 16:55:25 +02:00
byId("server_selection_add").addEventListener("click", e => { e.stopPropagation(); e.preventDefault(); window.location = "#login"; return false; });
byId("login").addEventListener("submit", e => { logIn(); e.stopPropagation(); e.preventDefault(); return false; });
byId("login_no_button").addEventListener("click", e => { e.stopPropagation(); e.preventDefault(); window.location = "#"; return false; });
2021-02-17 18:15:57 +01:00
byId("compose").addEventListener("keydown", e => {
if (checkKeyPress(e)) {
e.stopPropagation(); e.preventDefault();
return false;
}
return true;
});
2020-03-29 18:54:49 +02:00
updateComposeHeight();
2020-03-30 17:12:07 +02:00
checkScrolledToBottom();
2021-02-07 21:10:36 +01:00
2020-03-31 12:09:33 +02:00
populateServerSelectionList();
2021-02-07 21:10:36 +01:00
localstorage_credentials.getServers()
.map(server => server.endpoint)
.map(mm_client.get)
.forEach(client => client.getUsers());
2021-02-07 21:10:36 +01:00
populateChannelList();