Wednesday, March 23, 2005

Minor fix to Greasemonkey

It's been a while since I updated this blog (more than a month). Things have been very busy of late.

I haven't had chance to do much with Greasemonkey yet, but I had occasion to use it at work, to get around a coupld of annoying screens in the apps that I work on. So, I wrote a very short Greasemonkey user script to automatically submit whenever those screens came up. I showed it to a couple of co-workers and they were happy to use it. Apparently, I am not alone in the annoyance caused by those screens.

Anyway, while I was playing with the script, I noticed that the listbox for included pages in the Manage User Scripts dialog box was automatically adjusting its height based on the number of entries, but the window itself was not resizing. This causes the OK and Cancel buttons to be pushed down below the bottom edge of the window, essentially hiding them.

So, I looked at the XUL to see if I can fix it. I haven't done any XUL so far, except a little firefox extension that I use at work to make my life a bit easier, whose XUL was mostly a copy-and-paste job from other extensions. So, I had to look up the XUL reference documentation at XUL Planet. I found the documentation to very good and useful. It didn't take me long to find out what I needed. So, a two-line patch was all it took to fix the problem.

I submitted the patch to the Greasemonkey list, and Aaron applied the patch.


Post a Comment

Links to this post:

Create a Link

<< Home