Next article: Hypocrisy
Previous article: Not Porn: Chicago to Release Thirtieth Album
I recently installed a WordPress plugin that lets me look at my stats, and “writing bookmarklets” is pretty high on the list of search strings. In fact, I come up on the first page of a Google search. Crazy. “Better Living Through Bookmarklets” has some good information to get someone started. “Tips for Writing Bookmarklets” has some really good tips for writing bookmarklets once you’ve gotten a feel for it.
I highly recommend hacking the bookmarklets of others to see what makes them tick. Good targets are Jesse Ruderman’s bookmarklets and Tim Powell’s.
I saw one article in my Googling that advised using “ugly variable names,” ie, random alphanumeric strings, to avoid namespace interference. Ick. Encapsulate your bookmarklet in a function to restrict the scope of your variables. This is also a helpful trick to dispense with void()
.
The URL to trackback this post is:
http://kevinbasil.com/2006/02/09/writing-bookmarklets/trackback/
Copyright © 2002–2011 Kevin Robert (Basil) Fritts, all rights reserved.