Skip to content

Node.js based forum software built for the modern web

fix: remove use of jquery $(this) in ajaxify

Julian Lam176f4d0d0946
diff --git a/public/src/ajaxify.js b/public/src/ajaxify.js
index e6c4648dad..cd251194aa 100644
--- a/public/src/ajaxify.js
+++ b/public/src/ajaxify.js
@@ -527,8 +527,7 @@ $(document).ready(function () {
return;
}
- const $this = $(this);
- const href = $this.attr('href');
+ const href = this.pathname;
const internalLink = utils.isInternalURI(this, window.location, config.relative_path);
const rootAndPath = new RegExp(`^${rootUrl}${config.relative_path}/?`);
@@ -561,7 +560,7 @@ $(document).ready(function () {
}
};
- if ($this.attr('data-ajaxify') === 'false') {
+ if (this.getAttribute('data-ajaxify') === 'false') {
if (!internalLink) {
return;
}