From d4cc50c4682a3b2186c2ff93f21c0193cc553064 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Fri, 17 Mar 2023 10:53:24 -0700 Subject: [PATCH] web: Remove inappropriate $ prefix from HTML variables. Only jQuery object variables should be prefixed with $. Signed-off-by: Anders Kaseorg --- web/src/compose_validate.js | 4 ++-- web/src/narrow_error.js | 4 ++-- web/src/upload.js | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/web/src/compose_validate.js b/web/src/compose_validate.js index 2669ae26e4..d7266e23d3 100644 --- a/web/src/compose_validate.js +++ b/web/src/compose_validate.js @@ -234,7 +234,7 @@ function show_wildcard_warnings(stream_id) { const $compose_banner_area = $("#compose_banners"); const classname = compose_banner.CLASSNAMES.wildcard_warning; - const $wildcard_template = render_wildcard_warning({ + const wildcard_template = render_wildcard_warning({ banner_type: compose_banner.WARNING, subscriber_count, stream_name: compose_state.stream_name(), @@ -246,7 +246,7 @@ function show_wildcard_warnings(stream_id) { // only show one error for any number of @all or @everyone mentions if ($(`#compose_banners .${classname}`).length === 0) { - $compose_banner_area.append($wildcard_template); + $compose_banner_area.append(wildcard_template); } user_acknowledged_wildcard = false; diff --git a/web/src/narrow_error.js b/web/src/narrow_error.js index 45d715827a..f26d33badf 100644 --- a/web/src/narrow_error.js +++ b/web/src/narrow_error.js @@ -5,6 +5,6 @@ export function narrow_error(narrow_banner_data) { const html = narrow_banner_data.html; const search_data = narrow_banner_data.search_data; - const $empty_feed_notice = render_empty_feed_notice({title, html, search_data}); - return $empty_feed_notice; + const empty_feed_notice = render_empty_feed_notice({title, html, search_data}); + return empty_feed_notice; } diff --git a/web/src/upload.js b/web/src/upload.js index a2b8c0e217..8fef92e3c5 100644 --- a/web/src/upload.js +++ b/web/src/upload.js @@ -122,11 +122,11 @@ function show_upload_banner(config, banner_type, banner_text) { get_item("upload_banner_message", config).text(banner_text); return; } - const $new_banner = render_upload_banner({ + const new_banner = render_upload_banner({ banner_type, banner_text, }); - get_item("banner_container", config).append($new_banner); + get_item("banner_container", config).append(new_banner); } export function show_error_message(