Skip to content

Node.js based forum software built for the modern web

closes #2864

barisusaklic448c8cc8cfe
diff --git a/public/src/ajaxify.js b/public/src/ajaxify.js
index 0161d8a6ae..6178587423 100644
--- a/public/src/ajaxify.js
+++ b/public/src/ajaxify.js
@@ -78,6 +78,10 @@ $(document).ready(function() {
$(window).trigger('action:ajaxify.start', {url: url});
+ if (!window.location.pathname.match(/\/(403|404)$/g)) {
+ app.previousUrl = window.location.href;
+ }
+
ajaxify.currentPage = url;
if (window.history && window.history.pushState) {
@@ -243,10 +247,6 @@ $(document).ready(function() {
return e.preventDefault();
}
- if (!window.location.pathname.match(/\/(403|404)$/g)) {
- app.previousUrl = window.location.href;
- }
-
if (!e.ctrlKey && !e.shiftKey && !e.metaKey && e.which === 1) {
if (this.host === '' || this.host === window.location.host) {
// Internal link