mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-10 16:05:49 +01:00
moved widget rendering up a bit
This commit is contained in:
@@ -493,18 +493,18 @@ var socket,
|
||||
|
||||
app.load = function() {
|
||||
$('document').ready(function () {
|
||||
var url = window.location.pathname.slice(1),
|
||||
var url = window.location.pathname.slice(1).replace(/\/$/, ""),
|
||||
search = window.location.search,
|
||||
hash = window.location.hash,
|
||||
tpl_url = ajaxify.getTemplateMapping(url),
|
||||
$window = $(window);
|
||||
|
||||
url = url.replace(/\/$/, "");
|
||||
|
||||
if (url.indexOf(RELATIVE_PATH.slice(1)) !== -1) {
|
||||
url = url.slice(RELATIVE_PATH.length);
|
||||
}
|
||||
|
||||
ajaxify.widgets.render(tpl_url, url);
|
||||
|
||||
$window.trigger('action:ajaxify.start', {
|
||||
url: url
|
||||
});
|
||||
@@ -531,8 +531,6 @@ var socket,
|
||||
ajaxify.currentPage = url;
|
||||
app.processPage();
|
||||
|
||||
ajaxify.widgets.render(tpl_url, url);
|
||||
|
||||
if (window.history && window.history.replaceState) {
|
||||
window.history.replaceState({
|
||||
url: url + search + hash
|
||||
|
||||
Reference in New Issue
Block a user