Skip to content

linkify-line-numbers, no-modals - Support middle click#9354

Merged
SunsetTechuila merged 9 commits into
mainfrom
middle-click
May 7, 2026
Merged

linkify-line-numbers, no-modals - Support middle click#9354
SunsetTechuila merged 9 commits into
mainfrom
middle-click

Conversation

@SunsetTechuila
Copy link
Copy Markdown
Member

@SunsetTechuila SunsetTechuila commented May 6, 2026

@SunsetTechuila SunsetTechuila marked this pull request as ready for review May 6, 2026 19:40
@SunsetTechuila SunsetTechuila marked this pull request as draft May 6, 2026 19:42
this increases clickable area
@SunsetTechuila SunsetTechuila marked this pull request as ready for review May 6, 2026 19:48

function init(signal: AbortSignal): void {
delegate('td[data-line-number]:empty', 'click', openLinkToLine, {signal});
observe('.blob-num:empty:not(.blob-num-hunk)', linkify, {signal});
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New selector:

  • Prevents the feature from failing silently if the data-line-number attribute not found
  • Excludes these elements:
Image

@SunsetTechuila SunsetTechuila merged commit 76e40dd into main May 7, 2026
10 checks passed
@SunsetTechuila SunsetTechuila deleted the middle-click branch May 7, 2026 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants