mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-10 16:05:49 +01:00
only remove page # on IS
This commit is contained in:
@@ -55,7 +55,9 @@ define('forum/topic', [
|
|||||||
|
|
||||||
sort.handleSort('topicPostSort', 'user.setTopicSort', 'topic/' + ajaxify.data.slug);
|
sort.handleSort('topicPostSort', 'user.setTopicSort', 'topic/' + ajaxify.data.slug);
|
||||||
|
|
||||||
enableInfiniteLoadingOrPagination();
|
if (!config.usePagination) {
|
||||||
|
infinitescroll.init($('[component="topic"]'), posts.loadMorePosts);
|
||||||
|
}
|
||||||
|
|
||||||
addBlockQuoteHandler();
|
addBlockQuoteHandler();
|
||||||
|
|
||||||
@@ -207,14 +209,6 @@ define('forum/topic', [
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function enableInfiniteLoadingOrPagination() {
|
|
||||||
if (!config.usePagination) {
|
|
||||||
infinitescroll.init($('[component="topic"]'), posts.loadMorePosts);
|
|
||||||
} else {
|
|
||||||
navigator.disable();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function updateTopicTitle() {
|
function updateTopicTitle() {
|
||||||
var span = components.get('navbar/title').find('span');
|
var span = components.get('navbar/title').find('span');
|
||||||
if ($(window).scrollTop() > 50 && span.hasClass('hidden')) {
|
if ($(window).scrollTop() > 50 && span.hasClass('hidden')) {
|
||||||
@@ -264,7 +258,11 @@ define('forum/topic', [
|
|||||||
|
|
||||||
Topic.replaceURLTimeout = 0;
|
Topic.replaceURLTimeout = 0;
|
||||||
if (history.replaceState) {
|
if (history.replaceState) {
|
||||||
var search = (window.location.search && !/^\?page=\d+$/.test(window.location.search) ? window.location.search : '');
|
var search = window.location.search || '';
|
||||||
|
if (!config.usePagination) {
|
||||||
|
search = (search && !/^\?page=\d+$/.test(search) ? search : '');
|
||||||
|
}
|
||||||
|
|
||||||
history.replaceState({
|
history.replaceState({
|
||||||
url: newUrl + search
|
url: newUrl + search
|
||||||
}, null, window.location.protocol + '//' + window.location.host + RELATIVE_PATH + '/' + newUrl + search);
|
}, null, window.location.protocol + '//' + window.location.host + RELATIVE_PATH + '/' + newUrl + search);
|
||||||
|
|||||||
Reference in New Issue
Block a user