mirror of
https://github.com/zulip/zulip.git
synced 2025-11-10 00:46:03 +00:00
js: Normalize strings to double quotes.
Prettier would do this anyway, but it’s separated out for a more reviewable diff. Generated by ESLint. Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
06691e1e45
commit
f3726db89a
@@ -24,7 +24,7 @@ exports.send = function (opts) {
|
||||
};
|
||||
|
||||
channel.post({
|
||||
url: '/json/zcommand',
|
||||
url: "/json/zcommand",
|
||||
data: data,
|
||||
success: function (data) {
|
||||
if (on_success) {
|
||||
@@ -32,7 +32,7 @@ exports.send = function (opts) {
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
exports.tell_user('server did not respond');
|
||||
exports.tell_user("server did not respond");
|
||||
},
|
||||
});
|
||||
};
|
||||
@@ -40,10 +40,10 @@ exports.send = function (opts) {
|
||||
exports.tell_user = function (msg) {
|
||||
// This is a bit hacky, but we don't have a super easy API now
|
||||
// for just telling users stuff.
|
||||
$('#compose-send-status').removeClass(common.status_classes)
|
||||
.addClass('alert-error')
|
||||
$("#compose-send-status").removeClass(common.status_classes)
|
||||
.addClass("alert-error")
|
||||
.stop(true).fadeTo(0, 1);
|
||||
$('#compose-error-msg').text(msg);
|
||||
$("#compose-error-msg").text(msg);
|
||||
};
|
||||
|
||||
exports.enter_day_mode = function () {
|
||||
@@ -138,7 +138,7 @@ exports.process = function (message_content) {
|
||||
|
||||
const content = message_content.trim();
|
||||
|
||||
if (content === '/ping') {
|
||||
if (content === "/ping") {
|
||||
const start_time = new Date();
|
||||
|
||||
exports.send({
|
||||
@@ -154,30 +154,30 @@ exports.process = function (message_content) {
|
||||
return true;
|
||||
}
|
||||
|
||||
const day_commands = ['/day', '/light'];
|
||||
const day_commands = ["/day", "/light"];
|
||||
if (day_commands.includes(content)) {
|
||||
exports.enter_day_mode();
|
||||
return true;
|
||||
}
|
||||
|
||||
const night_commands = ['/night', '/dark'];
|
||||
const night_commands = ["/night", "/dark"];
|
||||
if (night_commands.includes(content)) {
|
||||
exports.enter_night_mode();
|
||||
return true;
|
||||
}
|
||||
|
||||
if (content === '/fluid-width') {
|
||||
if (content === "/fluid-width") {
|
||||
exports.enter_fluid_mode();
|
||||
return true;
|
||||
}
|
||||
|
||||
if (content === '/fixed-width') {
|
||||
if (content === "/fixed-width") {
|
||||
exports.enter_fixed_mode();
|
||||
return true;
|
||||
}
|
||||
|
||||
if (content === '/settings') {
|
||||
hashchange.go_to_location('settings/your-account');
|
||||
if (content === "/settings") {
|
||||
hashchange.go_to_location("settings/your-account");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user