Node.js based forum software built for the modern web
feat: single href
Barış Soner Uşaklı6669b23d9aa8
diff --git a/public/src/ajaxify.js b/public/src/ajaxify.jsindex cdbd3db3b1..8bfa09d7d4 100644--- a/public/src/ajaxify.js+++ b/public/src/ajaxify.js@@ -444,6 +444,8 @@ $(document).ready(function () {return;}+ var $this = $(this);+ var href = $this.attr('href');var internalLink = utils.isInternalURI(this, window.location, config.relative_path);var process = function () {@@ -475,7 +477,7 @@ $(document).ready(function () {}};- if ($(this).attr('data-ajaxify') === 'false') {+ if ($this.attr('data-ajaxify') === 'false') {if (!internalLink) {return;}@@ -483,12 +485,12 @@ $(document).ready(function () {}// Default behaviour for rss feeds- if (internalLink && $(this).attr('href') && $(this).attr('href').endsWith('.rss')) {+ if (internalLink && href && href.endsWith('.rss')) {return;}// Default behaviour for sitemap- if (internalLink && $(this).attr('href') && String(_self.pathname).startsWith(config.relative_path + '/sitemap') && $(this).attr('href').endsWith('.xml')) {+ if (internalLink && href && String(_self.pathname).startsWith(config.relative_path + '/sitemap') && href.endsWith('.xml')) {return;}@@ -499,7 +501,7 @@ $(document).ready(function () {return;}- if (hrefEmpty(this.href) || this.protocol === 'javascript:' || $(this).attr('href') === '#') {+ if (hrefEmpty(this.href) || this.protocol === 'javascript:' || href === '#' || href === '') {return e.preventDefault();}