mirror of
https://github.com/zulip/zulip.git
synced 2025-11-20 14:38:46 +00:00
ES and TypeScript modules are strict by default and don’t need this directive. ESLint will remind us to add it to new CommonJS files and remove it from ES and TypeScript modules. Signed-off-by: Anders Kaseorg <anders@zulip.com>
22 lines
574 B
JavaScript
22 lines
574 B
JavaScript
"use strict";
|
|
|
|
$(() => {
|
|
$(".portico-header li.logout").on("click", () => {
|
|
$("#logout_form").trigger("submit");
|
|
return false;
|
|
});
|
|
|
|
$("body").on("click", (e) => {
|
|
const $this = $(e.target);
|
|
|
|
if (
|
|
$this.closest(".dropdown .dropdown-pill").length > 0 &&
|
|
!$(".dropdown").hasClass("show")
|
|
) {
|
|
$(".dropdown").addClass("show");
|
|
} else if (!$this.is(".dropdown ul") && $this.closest(".dropdown ul").length === 0) {
|
|
$(".dropdown").removeClass("show");
|
|
}
|
|
});
|
|
});
|