Skip to content

Commit 6143e45

Browse files
committed
Link hints: don't show hints for spans which have clickable descendants
This is to remove the false hints that are shown on Google's search result pages, especially on tabs other than the main "All" tab. See #4303 and #4750.
1 parent 8b7ce14 commit 6143e45

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

content_scripts/link_hints.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1243,6 +1243,12 @@ const LocalHints = {
12431243
possibleFalsePositive = true;
12441244
}
12451245

1246+
// If the span is clickable but wraps something else that is clickable, we want to instead favor
1247+
// showing hints for descendants which are clickable. Flag the span as a possible false postive.
1248+
if (tagName == "span") {
1249+
possibleFalsePositive = true;
1250+
}
1251+
12461252
// Elements with tabindex are sometimes useful, but usually not. We can treat them as second
12471253
// class citizens when it improves UX, so take special note of them.
12481254
const tabIndexValue = element.getAttribute("tabindex");

0 commit comments

Comments
 (0)