mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 08:36:12 +01:00
fix: remove use of jquery $(this) in ajaxify
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user