contented: fix upload item disappearing once logged in
This commit is contained in:
parent
c2de4c8d45
commit
89c8cb0dc8
@ -690,6 +690,13 @@ var menu = new MenuList(el("#menubutton"));
|
||||
|
||||
menu.reset = function() {
|
||||
this.clear();
|
||||
|
||||
if (contented_url.length > 0) {
|
||||
menu.add("Upload", function() {
|
||||
contented_load();
|
||||
});
|
||||
}
|
||||
|
||||
this.add(joinparts_getstr(), toggle_joinparts);
|
||||
this.add(desktop_notifications_fmtstr(), desktop_notifications_toggle);
|
||||
this.add(warnonclose_fmtstr(), warnonclose_toggle);
|
||||
@ -1176,9 +1183,7 @@ window.onload = function() {
|
||||
});
|
||||
sock.on('contented', function(url) {
|
||||
contented_url = url;
|
||||
menu.add("Upload", function() {
|
||||
contented_load();
|
||||
});
|
||||
menu.reset(); // sent before login
|
||||
});
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user