mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-08 15:05:46 +01:00
use ajaxify.currentPage to find the user's location easily
This commit is contained in:
@@ -31,6 +31,7 @@ var ajaxify = {};
|
|||||||
|
|
||||||
var pagination, paginator_bar;
|
var pagination, paginator_bar;
|
||||||
|
|
||||||
|
ajaxify.currentPage = null;
|
||||||
ajaxify.go = function (url, callback, template, quiet) {
|
ajaxify.go = function (url, callback, template, quiet) {
|
||||||
// start: the following should be set like so: ajaxify.onchange(function(){}); where the code actually belongs
|
// start: the following should be set like so: ajaxify.onchange(function(){}); where the code actually belongs
|
||||||
$(window).off('scroll');
|
$(window).off('scroll');
|
||||||
@@ -69,6 +70,9 @@ var ajaxify = {};
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (templates.is_available(tpl_url) && !templates.force_refresh(tpl_url)) {
|
if (templates.is_available(tpl_url) && !templates.force_refresh(tpl_url)) {
|
||||||
|
console.log(tpl_url);
|
||||||
|
ajaxify.currentPage = tpl_url;
|
||||||
|
|
||||||
if (window.history && window.history.pushState) {
|
if (window.history && window.history.pushState) {
|
||||||
window.history[!quiet ? 'pushState' : 'replaceState']({
|
window.history[!quiet ? 'pushState' : 'replaceState']({
|
||||||
url: url
|
url: url
|
||||||
|
|||||||
Reference in New Issue
Block a user