---
title: Grablinks bookmarklet 2.0
categories:
- Code
tags:
- grablinks
- bookmarklet
- markdown
---

![](https://brettterpstra.com/uploads/2013/07/linkgrabber.png)

Another day, another version of [GrabLinks](http://brettterpstra.com/2013/07/03/saving-batches-of-links-from-web-pages/) (the bookmarklet for grabbing all links from a chosen section of a webpage as a Markdown list). The first major change is that the bookmarklet is now auto-updating. It loads the actual script from [the Gist](https://gist.github.com/ttscoff/5834741) and will therefore always load the latest stable version. It pops up a small "Loading" indicator until the script loads and, if needed, injects jQuery. If it's a fast load, you may just see a brief flash of white in the upper left corner, so that's what that is.

Next, it does the following:

* No repeated urls in output
* Handle relative links and local hashes better
* Better handling of title attributes
* Add origin link at top of output
* Don't force selection on click, allow copying individual parts of the output
* Add a close button
* Truncate long titles at 50 chars
* Do a better job of incrementing/decrementing padding on hover

To install, drag the link below into your bookmark bar (or grab the [raw version](https://gist.github.com/ttscoff/5834741/raw/grab%20links.bookmarklet) and edit) and delete any previous version.


<div class="elWrapper">
<a href='javascript:(function(){var p=document.createElement("p");p.innerHTML="<strong>Loading&hellip;</strong>";p.id="loadingp";p.style.padding="20px";p.style.background="#fff";p.style.left="20px";p.style.top=0;p.style.position="fixed";p.style.zIndex="9999999";p.style.opacity=".85";document.body.appendChild(p);document.body.appendChild(document.createElement("script")).src="//d2z4mgf8zqkbu2.cloudfront.net/bookmarklets/grablinks.js?x="+(Math.random());})();' class="bookmarklet">GrabLinks</a>
</div>


I doubt I'll take this one much further, but if you have any requests, feel free to let me know in the comments or by [contacting me directly](http://brettterpstra.com/contact/).

---

Brett is a writer and developer living in Minnesota, USA. You can follow him as ttscoff. This content is supported by readers like you. [More about Brett](https://brettterpstra.com/contact.md), including social links.

Copyright © 2026 Brett Terpstra. All rights reserved.
