mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 13:03:29 +00:00
ui: Explicity initialize night mode.
This commit is contained in:
@@ -55,7 +55,7 @@ var object_to_css = function (object) {
|
|||||||
return css.trim();
|
return css.trim();
|
||||||
};
|
};
|
||||||
|
|
||||||
(function () {
|
exports.initialize = function () {
|
||||||
// the object to be converted to CSS.
|
// the object to be converted to CSS.
|
||||||
// this should ONLY be used if there is no obvious way to perform this action
|
// this should ONLY be used if there is no obvious way to perform this action
|
||||||
// by prefixing the selector with `body.night-mode`.
|
// by prefixing the selector with `body.night-mode`.
|
||||||
@@ -90,7 +90,11 @@ var object_to_css = function (object) {
|
|||||||
stylesheet.disabled = true;
|
stylesheet.disabled = true;
|
||||||
$("body").removeClass("night-mode");
|
$("body").removeClass("night-mode");
|
||||||
};
|
};
|
||||||
}());
|
|
||||||
|
if (page_params.night_mode) {
|
||||||
|
exports.enable();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
return exports;
|
return exports;
|
||||||
}());
|
}());
|
||||||
|
|||||||
@@ -192,10 +192,6 @@ exports.restore_compose_cursor = function () {
|
|||||||
exports.initialize = function () {
|
exports.initialize = function () {
|
||||||
exports.set_compose_textarea_handlers();
|
exports.set_compose_textarea_handlers();
|
||||||
exports.show_error_for_unsupported_platform();
|
exports.show_error_for_unsupported_platform();
|
||||||
|
|
||||||
if (page_params.night_mode) {
|
|
||||||
night_mode.enable();
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
return exports;
|
return exports;
|
||||||
|
|||||||
@@ -331,6 +331,7 @@ exports.initialize_everything = function () {
|
|||||||
sent_messages.initialize();
|
sent_messages.initialize();
|
||||||
hotspots.initialize();
|
hotspots.initialize();
|
||||||
ui.initialize();
|
ui.initialize();
|
||||||
|
night_mode.initialize();
|
||||||
panels.initialize();
|
panels.initialize();
|
||||||
typing.initialize();
|
typing.initialize();
|
||||||
starred_messages.initialize();
|
starred_messages.initialize();
|
||||||
|
|||||||
Reference in New Issue
Block a user