Skip to content

Commit

Permalink
night mode: Fix initial state of night mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
timabbott committed Mar 8, 2019
1 parent 3df4990 commit 399aa43
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 8 deletions.
6 changes: 0 additions & 6 deletions static/js/night_mode.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@ var night_mode = (function () {

var exports = {};

exports.initialize = function () {
if (page_params.night_mode) {
exports.enable();
}
};

exports.enable = function () {
$("body").addClass("night-mode");
};
Expand Down
1 change: 0 additions & 1 deletion static/js/ui_init.js
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,6 @@ exports.initialize_everything = function () {
sent_messages.initialize();
hotspots.initialize();
ui.initialize();
night_mode.initialize();
panels.initialize();
typing.initialize();
starred_messages.initialize();
Expand Down
2 changes: 1 addition & 1 deletion templates/zerver/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
{% endblock %}
</head>

<body>
<body {% if night_mode %}class="night-mode"{% endif %}>
{% block content %}
{% endblock %}
</body>
Expand Down

0 comments on commit 399aa43

Please sign in to comment.