08
07
2007
) Ordered a presale ticket for the Chaos Communication Camp 2007
) Got myself a pre-order copy of VMware Fusion which is an absolute bargain for $39.99, since it would be well worth the $79.99 it will cost later on.
*) Found out that Tim Fite now also offers his 2004 album “2 Minute Blues” as a free download on his website. While you’re there make sure to also get “Over the Counter Culture”, which probably is the best new album I’ve heard this year.
Life’s (mostly) good!
Prickle-Prickle, Confusion 43, 3173 YOLD
Comments :
No comments »
Trackbacks :
No Trackbacks »
05
01
2007
Today I started writing a useful little Greasemonkey userscript for a browser-based MMRPG I’m playing. Although I’m no JavaScript guru I feel somewhat confident in the language and am quite fond of XPath ever since I joined the hoodwink.d community. Everything was going well, until I kind of hit a road block: selecting images whose src attribute contains a certain directory (e.g. “funky”) from a frame within a frameset. What sounds trivial at first cost me close to one and a half hours, but luckily enough I finally found a solution. To spare you the hassle, here’s the working result:
var xpath = "/html/frameset/frame[name='main']";
var frameResult = document.evaluate(xpath, document, null,
XPathResult.ANY_UNORDERED_NODE_TYPE,null).singleNodeValue;
var document2 = frameResult.contentDocument;
var imgResult = document2.evaluate("//img[contains(src,'funky')]", document2, null,
XPathResult.UNORDERED_NODE_ITERATOR_TYPE, null);
Of course if any of you know sbout a better way to achieve the same result, please don’t hesitate to post a comment, thanks!
On a completely unrelated note: I’m probably the last person to find out that Slashdot features random Futurama quotes in its HTTP headers, but nonetheless I find it pretty cool to find stuff like “X-Fry: The less fortunate get all the breaks!” in there!
Setting Orange, Chaos 5, 3173 YOLD
Comments :
No comments »
Trackbacks :
No Trackbacks »