Comment

Comment by Doublon

I have one bookmark that will copy to clipboard the current page URL + an anchor to the highlighted text:

    javascript:(function(){navigator.clipboard.writeText(`${window.location}#:~:text=${escape(window.getSelection().toString())}`);%20console.log("copied!");%20})();
Pretty useful to share a specific part of a page to someone else.

For example it will give you this: https://news.ycombinator.com/item?id=47888337#47888930#:~:te...

parent Doublon 6 months ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton