The Autodidacts

Exploring the universe from the inside out

Scroll-to-text fragment bookmarklet

TL;DR I made a thing and think it’s cool.

Have you ever wanted to send someone a link, not to a huge and confusingly-laid-out webpage, but to the one sentence that’s relevant to them?

So have I.

For technical people, this has sometimes been possible, by linking to subheadings. But many documents don’t have subheadings with IDs that can be linked to.

I read a wonderful post by Caleb Hearth, and learned that linking to specific text on the web is in fact possible:

https://calebhearth.com/text-fragments

When is this useful? Here’s a real life example. For the past five months I’ve been working on a 5,000-word essay on troubleshooting. I wanted to send the draft to friends, but it’s so long, I wasn’t sure they’d get around to reading it. The solution? I sent them links to the exact paragraphs talking about them.

However, as Caleb bemoans, it takes a long time to write those links by hand and get them to actually work.

I wanted an easy solution. So I made one. (If you use Chrome, there is an easy solution, but it’s not as fancy as what I made).

[Here’s a blingy GIF because it’s hard to explain this project with words.]

It’s a tiny bookmarklet that makes creating those “scroll-to-text fragment” links effortless. Installation is a breeze:

[Huge GIFs are slow to load. Sorry.]

The bookmarklet only handles basic usage (like Chrome's context menu). So I also created a widget that gives more fine-grained control:

[I optimized everything that could be optimized out of this GIF, and it’s *still* several megabytes...]

It’s open-source, and free to use. I hope you find it helpful:

https://www.curiositry.com/text-fragment-linker/

Sign up for updates

Join the newsletter for curious and thoughtful people.
No Thanks

Great! Check your inbox and click the link to confirm your subscription.