Archive for January, 2007

Creating a data URI from a file

Sunday, January 28th, 2007

Data URIs are a way of making a URI that actually contains the data inside it. They’re useful when you want to include normally external resources within another file (in my instance, including images in user styles).
The data URI kitchen is an online resource that lets you generate data URIs from files. But what if […]

Watching user input

Saturday, January 27th, 2007

A problem often encountered when making interfaces with JavaScript is how to get a function to run whenever a user changes the value of a text field. onchange only happens when the focus leaves the control, onkeyup will pick up useless strokes (like arrow keys) and won’t pick up on changes done by the mouse […]

Showing a menupopup in multiple places

Friday, January 26th, 2007

Sometimes in an extension you want to show the same menupopup in multiple places. Some users like status bar icons, some like using things under Tools, some like a toolbar button. (For the love of god, don’t put it everywhere by default! Put in some sensible defaults and rely on prefs or user styles for […]

FeedTools library

Friday, January 26th, 2007

I was using FeedTools to generate the RSS and Atom feeds on userstyles.org. Recently, I noticed some major performance problems - while Rails reported the database portion took less than a second, the rendering sometimes took 15 seconds. There wasn’t a huge amount of records - 25 at the most. The problem isn’t so much […]

Vanilla + Rails = Single sign in goodness

Monday, January 22nd, 2007

I’ve set up a forum for userstyles.org so my users can discuss Stylish and the site and styles without being to confined to a single thread on mozillaZine. When deciding on a forum, the main thing I was looking for was the ability to integrate it with  the current site - a forum account and […]

Now with more monkeying

Monday, January 22nd, 2007

All global styles are now available to Greasemonkey and Opera UserJS users. This is in addition to many of the site styles marked as such.
If you’re a style author and wondering how to get your styles available on Greasemonkey, here are the rules. A style must have no default namespace or HTML as the default […]

Rails performance tips

Saturday, January 20th, 2007

So during the site’s down time, I started looking at performance. I’m not that concerned in squeezing out an extra tenth of a second out of page load time, but I do want the site to be able withstand a digging for as long as possible.
Eager loading
Rails lets you easily define associations between classes and […]

“Restore Defaults” in XUL tree column pickers

Thursday, January 4th, 2007

I was looking into getting “Restore Defaults” working in Stylish’s tree column pickers. I figured they didn’t work because I was using custom tree views (where data is loaded by JavaScript rather than RDF). So I looked around for documentation on devmo and XUL Planet - nothing.  I thought that was strange, so I searched […]

I know, I know…

Wednesday, January 3rd, 2007

Yes, I realize the site’s down. It looks like because Rails doesn’t delete session data, the directory got too big and it’s screwing up the site. I tried to delete the data, but I can’t for some reason. I’ve got Dreamhost support on the case - hopefully they’ll be able to fix it shortly.

Adventures in development - Web standards and Firefox extensions