Bruce Lawson’s personal site

Reading List 252

2 Responses to “ Reading List 252 ”

Comment by Andrew Rabon

Hi Bruce! I saw your request on Twitter for a Chrome extension for scroll-to-text-fragment. I know Paul Kinlan made a bookmarklet but I went through the trouble of writing my own extension for it anyways.

Check it out: https://chrome.google.com/webstore/detail/copy-text-fragment-url/bemdbglmlhlkmkgfnleiofphhekephnm

I hope Firefox supports this soon (or rather, everyone comes to the best consensus), if only because Firefox supports the fancy Async Clipboard API in background scripts for extensions, and Chrome doesn’t. This boxed me in to using the @bumble/clipboard library and WebPack… not ideal obviously…

But I was damned if I could be asked to make invisible textareas and do execCommand myself for this one. 😅

Anyways this has already been fairly useful for me, so thank you for the idea!

Comment by Elena

Andrew,

I tried out your extension, and was going to try this bookmarklet, but the highlighter doesn’t work if you highlight over a certain amount of text. The created URL uses a comma to truncate the total quoted text in the query and seems “smart” enough to contextually find the right place to highlight. Do you think you could implement this behavior with your extension?

Regards,
Elena

Leave a Reply

HTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> . To display code, manually escape it.