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 19, 2024
1 parent 8d732d6 commit 640e62a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions searchJumper.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -5469,12 +5469,12 @@
return result;
}
dom.childNodes.forEach(ele => {
if ((ele.classList && ele.classList.contains("searchJumper")) || /^(img|svg|picture)$/i.test(ele.nodeName)) {
if ((ele.classList && ele.classList.contains("searchJumper")) || /^(img|svg|picture|br|hr)$/i.test(ele.nodeName)) {
const start = result.text.length;
result.text += "\n";
result.data[start] = {node: ele, text: "\n"};
} else if (ele.offsetParent || ele.offsetHeight) {
if (/^(li|p|a|td)$/i.test(ele.nodeName)) {
if (/^(div|h\d|p|form|ul|li|ol|dl|address|menu|table|fieldset|a|td)$/i.test(ele.nodeName)) {
let start = result.text.length;
result.text += "\n";
result.data[start] = {node: {}, text: "\n"};
Expand Down

0 comments on commit 640e62a

Please sign in to comment.