Skip to content

Commit

Permalink
Update searchJumper.user.js
Browse files Browse the repository at this point in the history
  • Loading branch information
hoothin committed Aug 18, 2024
1 parent bf361f8 commit 8d732d6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions searchJumper.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -14016,10 +14016,10 @@
}
if (mutation.addedNodes.length) {
[].forEach.call(mutation.addedNodes, addedNode => {
let target = addedNode.nodeType === 1 ? addedNode : mutation.target;
if (!target.className || !/searchJumper/.test(target.className)) {
if (addedNode.nodeType !== 1) return;
if (!addedNode.className || !/searchJumper/.test(addedNode.className)) {
setTimeout(() => {
highlight("insert", target)
highlight("insert", addedNode);
}, 0);
searchBar.initHighlight && highlightTimes++;
}
Expand Down

0 comments on commit 8d732d6

Please sign in to comment.