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.
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.
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.
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:
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.