Skip to content

Node.js based forum software built for the modern web

closes #1423

barisusakli80ef7e5085e2
diff --git a/public/src/ajaxify.js b/public/src/ajaxify.js
index 6969f6bd4c..877577f041 100644
--- a/public/src/ajaxify.js
+++ b/public/src/ajaxify.js
@@ -250,8 +250,17 @@ var ajaxify = ajaxify || {};
// Internal link
var url = this.href.replace(rootUrl + '/', '');
- if (ajaxify.go(url)) {
+ if(window.location.pathname === this.pathname && this.hash) {
+ if (this.hash !== window.location.hash) {
+ window.location.hash = this.hash;
+ }
+
+ ajaxify.loadScript(ajaxify.getTemplateMapping(url));
e.preventDefault();
+ } else {
+ if (ajaxify.go(url)) {
+ e.preventDefault();
+ }
}
} else if (window.location.pathname !== '/outgoing') {
// External Link