I'm young and I make emotionally-charged posts in a stream-of-consciousness style. Drunk with passion, I will be wrong most of the time. Call me on it and help me learn. It is embarrassing to look back at my mistakes, but I will grow.

Friday, September 22, 2006

LocalNames Greasemonkey script update

I fixed the LocalNames Greasemonkey script tremendously. It had a number of bugs stemming from the fact that it would just try to keep track of the last characters you'd pressed to figure out the last word you typed and see if it matched the regex for text between double brackets. One of them was that if you deleted anything it wouldn't update its last word buffer. The other was that if you hit spacebar twice and then started typing a LocalName it wouldn't load up. Now it just waits for you to hit a space, then looks up every LocalName that could be in the textarea and updates it. I haven't gotten it to mess up on me yet! I still need to figure out how to get it to work in GMail, Blogger, and Meebo. Once it works there, I'll probably use it 24/7.

Make sure you refresh any pages where you have textareas that you want to test it out in when you re-install the script. It has to re-add its listener events to the textareas, which can only be done when you refresh the page.


Okay, I really should go to sleep, but I just got the script working in GMail, Meebo, and Blogger. There are only two problems:

1. It'll drop you to the bottom of the textarea sometimes when you type a localname. -- 9/22 2:09pm: Fixed this bug with a bit of mathematical thinking. 2. If you type an invalid localname, it'll go haywire and start telling you the record can't be found over and over and over and over again every time you hit spacebar. Watch out for that one :) -- 9/23 4:47pm: Fixed this bug. Nothing will happen if you type an invalid LocalName now, not even a "record not found". When I convert the script into a full-blown firefox extension, I plan on giving a bunch of different options for what to do when LocalNames aren't found.

Since it has so many crazy little bugs, I'm just going to sneak you a beta and leave the other one around. But, how cool is it to be chatting with your friends via IM and then slip in a localname!? AWESOME!

Todo: Fix bugs mentioned above. Make a screencast.

Here's the latest lnlink beta.

No comments: