js: Prefix jQuery object variable names with $.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2022-01-25 02:36:19 -08:00
parent f21842e920
commit f84a2c08d5
195 changed files with 4883 additions and 4835 deletions

View File

@@ -137,15 +137,15 @@ export function get_direction(str) {
return "ltr";
}
export function set_rtl_class_for_textarea(textarea) {
export function set_rtl_class_for_textarea($textarea) {
// Set the rtl class if the text has an rtl direction, remove it otherwise
let text = textarea.val();
let text = $textarea.val();
if (text.startsWith("```quote")) {
text = text.slice(8);
}
if (get_direction(text) === "rtl") {
textarea.addClass("rtl");
$textarea.addClass("rtl");
} else {
textarea.removeClass("rtl");
$textarea.removeClass("rtl");
}
}