views:

204

answers:

2

How to create a bookmarklet like this one: http://www.vimeo.com/1626505

I want to create one the same, where to start? i want to know the work flow of how this one is working to build my own.

Thanks

+2  A: 

A bookmarklet is just a javascript program written on a single line of code replacing the usual location attribute (http://www.somestuffhere.com) on a bookmark.

To build your own bookmarklet, I suggest you to use Firebug : - type your code inside firebug and execute it until what you want to do is working, - then, remove all new lines in order to have a big one line piece of code, - create a new bookmark in your browser and, in the location field, write javascript: and copy-paste your single line of code.

You can try a simple bookmarklet by typing that directly in your browser location bar : javascript: alert('this is a very simple bookmarklet'); then type enter to execute it.

paulgreg
+1  A: 

Here is a handy bookmarket builder I have sometimes used. It can squash many lines of javascript into one line that can be set as the 'target' of a bookmark

(there may very well be better ones out there than this, but its done the job well for me)

Scott Evernden