mirror of
https://github.com/zulip/zulip-desktop.git
synced 2025-11-02 04:53:17 +00:00
xo: Unabbreviate variable names.
To satisfy unicorn/prevent-abbreviations in xo 0.28. Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
@@ -108,16 +108,16 @@ document.addEventListener('DOMContentLoaded', (): void => {
|
||||
}
|
||||
// Open image attachment link in the lightbox instead of opening in the default browser
|
||||
const { $, lightbox } = window;
|
||||
$('#main_div').on('click', '.message_content p a', function (this: HTMLElement, e: Event) {
|
||||
$('#main_div').on('click', '.message_content p a', function (this: HTMLElement, event: Event) {
|
||||
const url = $(this).attr('href');
|
||||
|
||||
if (LinkUtil.isImage(url)) {
|
||||
const $img = $(this).parent().siblings('.message_inline_image').find('img');
|
||||
|
||||
// prevent the image link from opening in a new page.
|
||||
e.preventDefault();
|
||||
event.preventDefault();
|
||||
// prevent the message compose dialog from happening.
|
||||
e.stopPropagation();
|
||||
event.stopPropagation();
|
||||
|
||||
// Open image in the default browser if image preview is unavailable
|
||||
if (!$img[0]) {
|
||||
|
||||
Reference in New Issue
Block a user