use template name instead of url

sometimes topic.tpl can be rendered on a different url
This commit is contained in:
Barış Soner Uşaklı
2024-01-24 11:27:07 -05:00
parent d5f445f15e
commit 20d88e6861

View File

@@ -458,11 +458,9 @@ define('navigator', [
};
function toggle(flag) {
const path = ajaxify.removeRelativePath(window.location.pathname.slice(1));
if (flag && (!path.startsWith('topic') && !path.startsWith('category'))) {
if (flag && (!ajaxify.data.template.topic && !ajaxify.data.template.category)) {
return;
}
paginationBlockEl.toggleClass('ready', flag);
paginationBlockEl.toggleClass('noreplies', count <= 1);
}