Commit 8567dd74 authored by Leo Iannacone's avatar Leo Iannacone

we do not really need to wait window.on('load') event because scripts are...

we do not really need to wait window.on('load') event because scripts are located on the pottom of layout.ejs, so when they run html is already loaded - removed
parent 11b20007
...@@ -508,7 +508,6 @@ function Page_Distrubion(socket) ...@@ -508,7 +508,6 @@ function Page_Distrubion(socket)
debug(1, "changing view", "old:", old_view, "new:", new_view) debug(1, "changing view", "old:", old_view, "new:", new_view)
}); });
$(window).on('load', function () {
if (! __check_hash_makes_sense()) if (! __check_hash_makes_sense())
return return
populate() populate()
...@@ -522,7 +521,7 @@ function Page_Distrubion(socket) ...@@ -522,7 +521,7 @@ function Page_Distrubion(socket)
// when page is loaded sidebar has offset().top // when page is loaded sidebar has offset().top
// equals 0. This is because html is loaded on socket // equals 0. This is because html is loaded on socket
// events. Sleep a while and call stiky.reset() // events. Sleep a while and call stiky.reset()
this.setTimeout(sticky.reset, 500); setTimeout(sticky.reset, 500);
// WORKAROUND: // WORKAROUND:
// On incoming hundred of lines browser goes crazy. // On incoming hundred of lines browser goes crazy.
...@@ -538,7 +537,6 @@ function Page_Distrubion(socket) ...@@ -538,7 +537,6 @@ function Page_Distrubion(socket)
// Update html according with preferences // Update html according with preferences
preferences() preferences()
});
}
}
} }
...@@ -22,8 +22,6 @@ function Preferences() { ...@@ -22,8 +22,6 @@ function Preferences() {
// init prefence page // init prefence page
this.initPage = function() { this.initPage = function() {
$(window).on('load', function() {
// set view according with config.preferences // set view according with config.preferences
for (key in config.preferences) { for (key in config.preferences) {
var element = $("#preferences #" + key) var element = $("#preferences #" + key)
...@@ -47,8 +45,6 @@ function Preferences() { ...@@ -47,8 +45,6 @@ function Preferences() {
page_generic.header() page_generic.header()
} }
}) })
})
} }
load() load()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment