v1.18.x
barisusakli 10 years ago
parent 98484a9b23
commit e461615c1a

@ -247,6 +247,11 @@ define('forum/topic', [
} }
if (newUrl !== currentUrl) { if (newUrl !== currentUrl) {
if (Topic.replaceURLTimeout) {
clearTimeout(Topic.replaceURLTimeout);
}
Topic.replaceURLTimeout = setTimeout(function() {
Topic.replaceURLTimeout = 0;
if (history.replaceState) { if (history.replaceState) {
var search = (window.location.search ? window.location.search : ''); var search = (window.location.search ? window.location.search : '');
history.replaceState({ history.replaceState({
@ -254,6 +259,7 @@ define('forum/topic', [
}, null, window.location.protocol + '//' + window.location.host + RELATIVE_PATH + '/' + newUrl + search); }, null, window.location.protocol + '//' + window.location.host + RELATIVE_PATH + '/' + newUrl + search);
} }
currentUrl = newUrl; currentUrl = newUrl;
}, 500);
} }
} }
return index; return index;

Loading…
Cancel
Save