nicer spinner animation, some cleaning
[wl-mobile.git] / assets / www / js / menu.js
index 2f9400b..9fea371 100644 (file)
@@ -7,6 +7,10 @@ var Menu = new function() {
        var self = this;
        var infoView = "ProjectInfo";
 
+       self.init = function() {
+               window.MenuInterface.setNightMode(View.getNightMode());
+       };
+
        self.start = function() {
                History.visit('');
        };
@@ -21,6 +25,11 @@ var Menu = new function() {
                        History.addBookmark(name);
        };
 
+       self.toggleNightMode = function() {
+               View.toggleNightMode();
+               window.MenuInterface.setNightMode(View.getNightMode());
+       };
+
        self.setInfoButton = function(view, label, enabled) {
                self.infoView = view;
                window.MenuInterface.setInfoButton(label, enabled);