From 176f4d0d094673dd8f16e2f736e066cdd52e431b Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Wed, 11 Sep 2024 10:22:34 -0400 Subject: [PATCH] fix: remove use of jquery $(this) in ajaxify --- public/src/ajaxify.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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; }