Skip to content

Conversation

geekbrother
Copy link

Description

Adds a new user setting to control whether overlapping link-hint markers are visually de-duplicated.
When enabled, only one marker is shown per overlapping region to reduce clutter.

Motivation

Overlapping hints can stack and obscure each other in dense UIs.
Most of the overlapping hints on modern websites point to the same link to support tapping on mobile devices, since it's limited by the finger width.
Users may prefer either cleaner visuals or full visibility of all hints; this makes it configurable.

Changes

  • New setting: suppressOverlappingHintMarkers (default: true) in lib/settings.js.
  • Options UI: Checkbox “Hide overlapping link-hint markers” added to pages/options.html.
  • Options binding: Registered the setting in pages/options.js so it saves/restores with other preferences.
  • Behavior gating: Calls to suppressOverlappingMarkers() in content_scripts/link_hints.js now respect the new setting.

Default Behavior

  • Enabled by default: overlapping markers are hidden except for one per overlapping region.
  • Users can disable this in the Options page to show all overlapping markers.

User-facing UI

  • Options → “Hide overlapping link-hint markers” (pages/options.html).

Testing

  • Verified no linter errors.
  • Manual checks:
    • Toggle setting on/off and launch link hints on dense pages.
    • With setting ON: only one marker is visible where hints overlap; rotation still functions.
    • With setting OFF: all overlapping markers display.

@geekbrother
Copy link
Author

cc @philc @philg-dev for a review 🙏

@philg-dev
Copy link
Contributor

philg-dev commented Sep 30, 2025

Hi @geekbrother I'm not entirely sure why you specifically addressed me for a review, as I'm just another random contributor. So just letting you know that nothing of what I'm saying has anything to do with what the owner and the maintainers of the project think about it.

Some issues regarding the same or strongly related topics:

Feedback regarding the changes in this PR:

  1. You can simply hit <space> to cycle through overlapping hints, bringing a different one to the top each time.

  2. I think enabling this new behavior by default would be a really bad idea because not all overlapping hints are just "useless duplicates". If I remember correctly there's even cases on Google, Reddit and GitHub where a distinction between some overlapping hints is regularly important to have (and using <space> to cycle through them provides a working interaction for those cases. Not only would that be a breaking feature on sites like that, but it would also suddenly disturb the user experience of the existing users which are used to the current behavior.

  3. After taking a look at the code it seems to me like there should be a more efficient way to implement it, maybe on-the-fly during the linkHints generation process, I'm not sure. Adding an additional O(n²) pass over all the link hints seems a bit concerning to me, as on cluttered / complex sites there can be quite a lot of hints present.

Just as a side note: I did not test the PR on my end. So my feedback doesn't include a test of the runtime behavior.

Let's see what the others have to say about it though - as I said, I'm just a "nobody".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants