Linking to Text Fragments with a Bookmarklet
Posted4 months agoActive4 months ago
alexwlchan.netTechstory
calmmixed
Debate
40/100
Text FragmentsBookmarkletsBrowser Features
Key topics
Text Fragments
Bookmarklets
Browser Features
The post discusses a bookmarklet that links to text fragments on a webpage, but the discussion highlights limitations and potential improvements, including redundancy with built-in features and usability issues.
Snapshot generated from the HN discussion
Discussion Activity
Light discussionFirst comment
3d
Peak period
5
78-84h
Avg / period
4
Key moments
- 01Story posted
Sep 15, 2025 at 2:51 AM EDT
4 months ago
Step 01 - 02First comment
Sep 18, 2025 at 1:09 PM EDT
3d after posting
Step 02 - 03Peak activity
5 comments in 78-84h
Hottest window of the conversation
Step 03 - 04Latest activity
Sep 18, 2025 at 8:02 PM EDT
4 months ago
Step 04
Generating AI Summary...
Analyzing up to 500 comments to identify key contributors and discussion patterns
Discussion (8 comments)
Showing 8 comments
xnx
4 months ago
1 replyAs pointed out on the page, the bookmarklet functionality is redundant to built-in context menu feature.
crtasm
4 months ago
1 replyFirefox did not have the menu item for me, I had to go into about:config dom.text_fragments.create_text_fragment.enabled
throwaway81523
4 months ago
1 replyDoesn't appear supported in Firefox 128 LTS. No highlighting whatever I do. Thanks though, maybe it turns up in some later version.
extra88
4 months ago
Text fragment linking was added in Firefox 131. Firefox 140 is the newest Extended Support Release (ESR) so it can follow such links but I don't know if the context menu has the option to create them.
ulrischa
4 months ago
2 repliesThe implementation is not very good because you can not copy the link generated from the alert.
Use this to copy to clipboard:
https://gist.github.com/ulrischa/405b93646a0114986575000dcc0...
privatelypublic
4 months ago
In windows it should be ctrl+c like always for alert()s- even if the UI doesn't show it. Unless "modern" UI has broken that feature.
aalukabi
4 months ago
You are awesome, I came to highlight it and there is already the answer. Appreciated.
johnnymellor
4 months ago
This would be useful in Chrome for Android (which doesn't yet have this feature built-in), but activating bookmarklets on Android (via https://paul.kinlan.me/use-bookmarklets-on-chrome-on-android...) clears the text selection. So instead I've put together an alternative bookmarklet that lets you select the text to link to after activating the bookmarklet: https://gist.github.com/johnmellor/ef5ecf555f28b324b045e0c93...
View full discussion on Hacker News
ID: 45246840Type: storyLast synced: 11/20/2025, 5:28:51 PM
Want the full context?
Jump to the original sources
Read the primary article or dive into the live Hacker News thread when you're ready.