Jesse on loading JS Console in the sidebar:
- Bookmark chrome://global/content/console.xul
- Right-click on the bookmark, select properties, and check “Load this bookmark in the sidebar”
random($foo) is the occassionally still updated blog of Leonard Lin. My pics are on Flickr, code is on Github. @lhl on Twitter. More »
Jesse on loading JS Console in the sidebar:
I found myself today in need of a free Windows ISO burner sw package (to burn a Linux ISO of course). Here’s what I found:
I hit a minor roadblock trying to see how I could get an object reference from within an object. Tom Trenka whipped up a quick little function (which is so obvious after you see it 🙂
function getObjectString(obj, scope) {
for (var p in scope) {
if (scope[p] == obj) return p;
}
return null;
}
It’s messy and O(n), true, but unless you have a mess of variables, not too bad.
Jesse made a suggestion on how I could avoid needing the string completely by assigning an IFrame.onload, but there are race conditions (unless you use event attachment, see below), and also Mozilla was giving me crap (is it running the onload before the document is finished?)
It occurred to me that there are lots and lots of little JS snippets like Tom’s which are enormously useful helpers, but hard to keep track of. Perhaps they should all go in a little snippets library/repository or something…
Instead of working on computer stuff, how about cars:
$400 | Engine | ACT VR6/TDI/G60/B3-16V Heavy Duty Clutch Kit |
<$100 | Engine | Flywheel lightening, resurfacing (13-14lb) |
$1200 | Suspension | Koni or Bilstein PSS9 Coilover kit |
$500 | Lights | Hella Dual Round Smoked Headlight Kit |
I’ve finally finished upgrading my system (I dropped in an ATI 9800 Pro [which detects as an XT and clocks accordingly] and an Athlon XP 3000+, but needed a beefier heatsink), and although my CPU is underclocked a bit (my old motherboard only goes to 12.5x multiplier, not 13x). My Doom 3 timedemos have gone from a rather anemic 20fps at 800×600 Low Quality to a respectable 45fps at 1024×768 High Quality.
That being said, I think I’m pretty much over this “installing my own hardware thing.” I think I realized this after I managed to pry off the old heat sink and as I was removing glue residue from the new one.
I’m not a huge fan of the MkV design, but the new GTI looks great (love the old school trim). Hmmm, probably $25K w/ DSG, hitting US shores Q3 2005.