Some code that might help with developing complex bookmarklets for web apps