The Sapience Society The advice of a self-proclaimed technological ninjician

9Jun/100

Generate Javascript Bookmarklets Using A Simple PHP Function

I wrote a pretty simple PHP function for converting Javascript into a bookmarklet. As you'll see, it's nothing too crazy. I did come up with a kind of interesting way of shortening the source using base 64. I don't know if I'm the first person to do this, but I came up with the idea on my own (no plagiarism!). Unfortunately, it's not IE compatible.. so there's a switch to turn that feature off (if you want).