ajaxify.refresh(); removed console.log

v1.18.x
psychobunny
parent de9100c489
commit 67e49db797

@ -32,6 +32,7 @@ var ajaxify = {};
var pagination, paginator_bar; var pagination, paginator_bar;
ajaxify.currentPage = null; 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');
@ -70,7 +71,6 @@ 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; ajaxify.currentPage = tpl_url;
if (window.history && window.history.pushState) { if (window.history && window.history.pushState) {
@ -133,6 +133,10 @@ var ajaxify = {};
return false; return false;
}; };
ajaxify.refresh = function() {
ajaxify.go(ajaxify.currentPage);
};
$('document').ready(function () { $('document').ready(function () {
if (!window.history || !window.history.pushState) { if (!window.history || !window.history.pushState) {
return; // no ajaxification for old browsers return; // no ajaxification for old browsers

Loading…
Cancel
Save