Skip to content

Highlight target disabled feature in settings#8918

Draft
SunsetTechuila wants to merge 15 commits intomainfrom
options
Draft

Highlight target disabled feature in settings#8918
SunsetTechuila wants to merge 15 commits intomainfrom
options

Conversation

@SunsetTechuila
Copy link
Copy Markdown
Member

resolves #8833

Test URLs

Screenshot

@github-actions github-actions bot added the meta Related to Refined GitHub itself label Jan 29, 2026
@SunsetTechuila SunsetTechuila changed the title highlight target disabled feature Highlight target disabled feature in settings Jan 29, 2026
@SunsetTechuila

This comment was marked as off-topic.

async function init(): Promise<void> {
await generateDom();
addEventListeners();
scrollTargetIntoView();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

No JS for this please: #8833 (comment)

See also the mention of scroll-margin a couple of comments above.

Copy link
Copy Markdown
Member Author

@SunsetTechuila SunsetTechuila Jan 30, 2026

Choose a reason for hiding this comment

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

No JS for this please: #8833 (comment)

No JS:

msedge_zwcOx7aMSS

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What browser is that? My gif in that comment shows it working in Chrome

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.

See also the mention of scroll-margin a couple of comments above.

I decided that scrolling to the center was better than setting scroll-margin-top to an arbitrary value

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

"Better" is arbitrary, all :targets work like this on the web: the linked anchor appears at the top. Here we can also highlight it, which improves it further.

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.

What browser is that?

MS Edge. But I'm sure you'll get the same result with Chrome if you try this branch with scrollTargetIntoView commented

@fregante

This comment was marked as resolved.

@SunsetTechuila SunsetTechuila marked this pull request as ready for review March 23, 2026 05:04
@SunsetTechuila SunsetTechuila marked this pull request as draft March 23, 2026 05:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

meta Related to Refined GitHub itself

Development

Successfully merging this pull request may close these issues.

Highlight the target disabled feature on the options page

2 participants