dylan bathurst

Synopsis of Speedlinking Bookmarklet for Zappos and Twitter

With the introduction to Zappme links on Zappos.com product pages, I constructed a javascript based bookmarklet that will post products’ links to twitter for you. Taking away the need to copy and paste.

A while ago I wrote a simple javascript bookmarklet for posting a link to twitter without having to copy and paste. With the introduction to zappme, a new feature on zappos.com that creates a short url for product pages, I saw the potential to evolve my original bookmarklet.

How It Works

On each product page underneath the products image there is a textarea that contains a generated zappme link. On both the classic zappos and the new zeta site the textarea element has an id of zappme. This makes it really easy for the javascript to grab the contents of the textarea, and the rest is the code I had from my previous bookmarklet.

The Code

javascript:void(location.href='http://twitter.com/home?status='+document.getElementById('zappme').innerHTML)

Simple Explanation

The part of the javascript that says document.getElementById(’zappme’).innerHTML scans the page for an HTML element with the id of zappme and grabs whatever is inside that element. In this case it’s a url that looks similar to this. http://zapp.me/7396959 That url is then passed through the another url to twitter where it then populates your status update field.

In one click you’re on you’re twittering about a Zappos product with a nice, short link that won’t eat up all of your precious 140 character limit. So basically this:

http://zeta.zappos.com/product/7396959/color/2105

Is now this:

http://zapp.me/7396959

To use this bookmarklet drag this ZappMe link to your bookmarks bar and simply click it while on a zappos product page.