diff --git a/src/html/js/entries.js b/src/html/js/entries.js
index af608f0..4026c60 100644
--- a/src/html/js/entries.js
+++ b/src/html/js/entries.js
@@ -25,7 +25,6 @@ function message(alertType, title, message) {
var ListViewModel = function() {
var self = this;
- window.viewModel = self;
self.account = ko.observable();
self.accounts = ko.observableArray([]);
@@ -275,8 +274,6 @@ var ListViewModel = function() {
self.loadMonths(account);
}
};
-
- $(document).ready(self.loadAccounts);
};
function dateToString(date) {
@@ -421,5 +418,9 @@ ko.bindingHandlers.chart = {
}
};
-ko.applyBindings(new ListViewModel());
+var viewModel = new ListViewModel();
+
+ko.applyBindings(viewModel);
+
+$(viewModel.loadAccounts);