Skip to content

Commit a94e5ef

Browse files
committed
Code cleanup
1 parent 922198f commit a94e5ef

File tree

2 files changed

+6
-14
lines changed

2 files changed

+6
-14
lines changed

static/js/terrariumpi.js

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -875,17 +875,15 @@ function notification_timestamps() {
875875
});
876876
}
877877

878-
879878
function update_online_indicator(online) {
880-
var online_indicator = $('li#online_indicator');
879+
var indicator = $('li#online_indicator');
881880

882-
online_indicator.find('span.online, span.offline').hide();
881+
indicator.find('span.online, span.offline').hide();
883882
if (online) {
884-
online_indicator.find('span.online').show();
883+
indicator.find('span.online').show();
885884
} else {
886-
online_indicator.find('span.offline').show();
885+
indicator.find('span.offline').show();
887886
}
888-
889887
update_online_messages(online);
890888
}
891889

@@ -897,8 +895,6 @@ function is_offline() {
897895
update_online_indicator(false);
898896
}
899897

900-
901-
902898
function update_door_indicator(status) {
903899
var indicator = $('li#door_indicator');
904900

@@ -922,8 +918,7 @@ function update_door_indicator(status) {
922918
} else if ('closed' === status) {
923919
indicator.find('span.closed').show();
924920
}
925-
926-
update_door_messages('open' === status)
921+
update_door_messages('open' === status);
927922
}
928923

929924
function door_open(open) {
@@ -959,9 +954,6 @@ function update_player_indicator(data) {
959954
update_player_messages(data);
960955
}
961956

962-
963-
964-
965957
function get_theme_color(color) {
966958
if (color == 'orange') return '#f0ad4e';
967959
return $('<div>').addClass(color).css('color');

terrariumEngine.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ def door_status(self, socket = False):
545545
door_closed = door_closed and self.doors[doorid].get_status() == terrariumDoor.CLOSED
546546

547547
if len(self.doors) == 0:
548-
data = 'disabled';
548+
data = 'disabled'
549549
else:
550550
data = terrariumDoor.CLOSED if door_closed else terrariumDoor.OPEN
551551

0 commit comments

Comments
 (0)