selberg.org Home Home

Archive for March 27th, 2005
3/27/05
3:04 am
How much do I love my car?

So, my car, a 1971 Plymouth Satellite Sebring Plus, has been making some metal-on-metal noises of late… not sure why. My dad and I suspect it may be the shocks (as they’re original, and at 120K miles are, unsurprisingly, shot). I took it to the mechanic up the street, and they noticed that the front-end needs a lot of work. $600 to do the tire ends (inner and outer), another $400 for a new steering box, $300 for 4 Gabriel shocks ($50 a pop) and 1.25 hours to put ‘em in… and we’re looking at nearly $1500 to make the car ride much nicer.

So, I’ve said I’d start looking when I had to pay more than $3,000 at one time to fix the car. I don’t now, but ouch, $1500? Hmmm… at $500 every six months, I don’t mind, as I budget $1000 a year for random car repairs. Perhaps I should budget $2000 now? But we’re only in March, and already going through a lot of repairs.

Decisions decisions… I’ll probably take the car up to the mechanic I’ve been using in Woodinville for a 2nd estimate… see how it compares, although I suspect it’ll be about the same. And I’ll probably get it done over the year (vs now)… hmm… but I do feel weird putting in half the car’s value for some front-end work. Ah well…

3/27/05
2:12 am
Sick! Blech

Both Laura and I have been sick the past few days, although I think she’s getting the worst of it — fevers of 101, 102, and so on. Go go gadget Tylenol!

In other news, I finally found Doogie’s blog of his adventues in the Sandbox. Like everyone back there, my best wishes for coming back walking and in one piece.

3/27/05
1:32 am
msn_tryothers

My first Firefox extension is a GreaseMonkey script. GreaseMonkey is an extension that lets you create user-level scripts and plug them in… it really trims down the level and skill for writing (and learning!).

I wrote up one called TryOthers for MSN that just puts in a “Try your search on these engines:” on the page. It’s based on the Butler script that does the same to Google. It’s still a big longer and more intimidating than it needs to be, but here’s the useful bit:


        // add other search sites to web search
        addOtherWebSearches: function() {

            var header = document.evaluate("//div[@id='header']/h5″, documen\
t, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
            if (!header) return;

           this.addGlobalStyle(’#tryOthers {margin-bottom:1em;}’);

            // it’d be nice to use document.qf, but MSN uses id= vs name=
            var q = escape(document.forms[0].q.value);
            var other = document.createElement(’div’);
                    other.setAttribute(”id”, “tryOthers”);
            var s = ”;
            s += ‘Try your search on:’;
            s += TryOthersServices._otherWebSearches(q);
            s += ‘
‘; other.innerHTML = s; header.parentNode.insertBefore(other, header.nextSibling); }, }

A couple things to note… first, we add some global CSS style info there. Second, we’re looking for a particular node designated by a particular class — a H5 in a DIV with id=”header. Once we have that, we then stick the TryOthers string in front of it. Simple as that.

The hardest thing about this script is identifying the node you want to alter… it’s really easy if the person writing the page gave you a DIV with an appropriate ID, but usually you are going after something else, so it can take a bit of troubleshooting. And, there’s no real debugger (that I’ve found), so it’s a lot of trial-and-error and logging via the alert() call. Bleah.