Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
import {$} from "jquery";
import * as blueslip from "./blueslip.ts";
import * as message_feed_loading from "./message_feed_loading.ts";
import * as util from "./util.ts";
export let page_load_time: number | undefined;
// Miscellaneous early setup.
$(() => {
page_load_time = Date.now();
// Display loading indicator. This disappears when the initial
// message fetch completes.
message_feed_loading.show_loading_initial_page();
$.fn.get_offset_to_window = function () {
return util.the(this).getBoundingClientRect();
};
$.fn.expectOne = function () {
if (blueslip && this.length !== 1) {
blueslip.error("Expected one element in jQuery set", {length: this.length});
}
return this;
};
});