Time left in Bush's term

Days

Hours

Min.

Sec.
Countdown clock provided by BushsLastDay.com

Project Insomnia

Project Insomnia is many things, but in this context it is simply a "braindump" of whatever I happen to be thinking/reading/watching/doing at the moment. Parental guidance suggested.

Monday, March 24, 2008

Writing for Peanuts and Loving It

Writing for Peanuts and Loving It:
The Internet is full of words written for no money at all, just for passion. And it's veined with pieces (like this one) written in someone's regular line of work. Now, though, more and more online copy is being cranked out by a hybrid class: people like Papple, happy to serve as ultra-low-cost freelancers for sites that — unlike many personal blogs — actually get readers.

Greasing the wheels are sites like Helium, ThisIsBy.Us and Associated Content, which dangle micro amounts of pay to amateur writers willing to contribute material. Virtually any topic is open, from advice about child-rearing to an exegesis of mood rings.


I've been doing a bit more writing for MousePlanet lately and I find that the more I write, the easier it seems to flow, but when I don't write anything for a long time it seems to be difficult to get the first words out. So I'm considering trying one or more of these services to see if, even if I don't actually make any money, I can do some topical writing that will be reviewed and commented on.
|| Andrew, 12:12 PM || || link ||

Sunday, March 23, 2008

Happy Easter!



(bok bok!)
|| Andrew, 7:20 PM || || link ||

Monday, March 10, 2008

It's Mogulicious!

The long-awaited firmware update for the Sprint-branded HTC Mogul is finally available:
Sprint said Monday it was releasing a software update for the Mogul phone, made by HTC Corp. of Taiwan, that will enable the phone to connect at Rev. A speeds. Downloads speeds should be 600 kilobits per second to 1,400 kbps, up from a range of 400 kbps to 700 kbps with Rev. 0. It will be capable of uploads of 350 to 500 kbps, up from 50 kbps to 70 kbps.


Firmware download link -- it's taking a nail-bitingly long time to download, probable due to every Mogul owner trying to grab it all at once. Isn't this why BitTorrent exists? I'll report on the upgrade experience and performance gains when it's done.
|| Andrew, 10:56 AM || || link ||

Bad Day

I first saw one segment of this clever compilation over ten years ago. Funny how it still resonates.



I also really like the accompanying song--Rachel Maddow plays it whenever some hapless Republican gets indicted or loses another election.
|| Andrew, 10:03 AM || || link ||

Friday, March 07, 2008

Wye Knott

In celebration and recognition of the fact that this year's Wyoming Democratic primary election (Saturday) will actually matter:

Click me
Flash, sound, new window

Labels: ,

|| Andrew, 3:13 PM || || link ||

Wednesday, March 05, 2008

Use a class to control whether links open in new windows (tabs) via JavaScript

This took me most of the day to figure out so I'm noting it here for anyone else who needs it. The object is to be able to set a list of links to open in a new window/tab without having to add target="_blank" to each and every one.

First, we wrap our list of links in a DIV and give it a class name to reference later:

<div class="extLinks">
<ul><li><a href="http://www.project-insomnia.com/">Project Insomnia</a></li>
<li><a href="http://www.mouseplanet.com/">MousePlanet</a></li></ul>
</div>


Of course that list of links could be much longer and adding the target="_blank" attribute to each one would surely be a pain. Having thus classed the list, here is the script to add to our HEAD section (or included script file):

function setExtLinkTargets()
{
for ( var e = 0; e < document.anchors.length; e++ ) {
if ( document.anchors[e].className == "extLinks" ) {
document.anchors[e].target = '_blank';
document.anchors[e].title = document.anchors[e].title + ' (opens in new window)';
}
}
document.divs = document.all ? document.all.tags('div') : document.getElementsByTagName('div');
for ( var f = 0; f < document.divs.length; f++ ) {
if ( document.divs[f].className == "extLinks" ) {
document.divExtLinks = document.all ? document.divs[f].all.tags('a') : document.divs[f].getElementsByTagName('a');
for ( var g = 0; g < document.divExtLinks.length; g++ ) {
document.divExtLinks[g].target = "_blank";
document.divExtLinks[g].title = document.divExtLinks[g].title + ' (opens in new window)';
}
}
}
}


This function has two parts; one that processes DIVs with class "extLinks" and another that processes individual links. Why the second? Because if we already have the overhead of the script running on the page load, we might as well have all of our new-window links controlled in one place. So we can also add class="extLinks" to any individual A element for the same effect.

Finally, we just need to call the script as soon as the page has finished loading. I like to put a general onLoadHandler() function in each of my pages:

function onLoadHandler()
{
// other onLoad stuff
setExtLinkTargets();
}


and call it from the BODY element's onload event:

<body onload="onLoadHandler();">

That's it! Now any list or group of links wrapped in a DIV of class "extLinks", or any individual links of class "extLinks" will open in a new window or tab.

Labels: , , ,

|| Andrew, 5:53 PM || || link ||

"Project Insomnia" and "project-insomnia.com" ™ & SM; site contents © Andrew Rich except where noted.