Archive for January, 2006

Breaking the NIE practicum webpage

January 28, 2006  |  Tags:   |  

The NIE Practicum Office website has this nasty piece of incompatible JavaScript that renders the page unusable in any browser but Internet Explorer. Essentially it’s a JS DOM trick that shows and hides blocks of information below sub-headings, but implemented wrongly at the “checking for browser compatibility” level, so all browsers but IE get the wrong scripts to run.

To solve this problem, I wrote fixpracticum.user.js: a Firefox script for use with GreaseMonkey that enables the hidden blocks’ visibility by default. After I wrote that, I was all pleased with myself and was about to write something similar (CSS-based) to fix the problem in Safari, but I noticed that if one just disabled JavaScript when viewing the site, that worked just fine too, i.e. (pun unintentional), the hidden blocks are visible by default.*

Oh well. Whatever works.

  • This is because the webpage doesn’t use a separate stylesheet to hide them, instead running some JS code to inject the “visibility:hidden” and “display:none” styles into the code upon loading the webpage. Oddness.

Tags:

Festive Fruitmonsters, Part 1

January 28, 2006  |  Tags:   |  

Watermelon Monster says,

Wmmonster

I have no future in the greeting card business, I know. Enjoy the long weekend!

Tags: ,

Chicken vs Purportedly Friendly Snake

January 24, 2006  |  Tags:   |  

Inspired by this news article about a snake befriending its lunch hamster.

Chickenvssnake

Previous: Chicken vs Horror Movie

Info: What’s with all the chickens?

Tags: ,

They Might Live In Giants

January 23, 2006  |  Tags:   |  

From the Straits Times Dashboard widget news summary:

“Temasek Holdings confirmed on Monday that it was part of a group that purchased the shares of Thai Prime Minister Thaksin Shinawatra’s family in a telecommunications giant.”

Initial thoughts: (1) Temasek now owns shares in Thaksin’s family? Nice!; (2) Thaksin’s family is in a wha?!

Warped sentence-processing, visualised:

Shin

Safari Web Inspector

January 17, 2006  |  Tags:   |  

The new Safari web inspector (available in nightly Webkit downloads) looks very, very nice. Hopefully this makes it into a stable release of the browser itself, or someone hacks it in.

The Web Inspector lets you browse the live DOM hierarchy in a compact HUD style window, catering to the needs of web developers and WebKit hackers alike. The Web Inspector highlights the node on the page as it is selected in the hierarchy. You can also search for nodes by node name, id and CSS class name.

(from Surfin’ Safari)

Screenshot (click to enlarge):

Chicken vs Horror Movie

January 14, 2006  |  Tags:   |  

This one’s for the friends I conned into watching The Descent with me… Sorry.

Chickenvshorror

Such a great movie, though!

Previous: Chicken vs Cannibal

Info: What’s with all the chickens?

Tags: ,

Spend spend spend

January 11, 2006  |  Tags:   |  

Dammit. The new MacBook Pros show up right around when the extended warranty on my trusty old PowerBook expires. Chinese new year ang pows + one month’s salary should raise just about enough funds for one. Hmmmmm.

So if the PowerBooks have been renamed to MacBooks, do the PowerMacs become MacMacs?

Chicken vs Cannibal

January 9, 2006  |  Tags:   |  

Chickenvscannibal

Tastes like Chicken!!

Previous: Chicken vs The Fragility of Life

Info: What’s with all the chickens?

Tags: ,

Chicken vs The Fragility of Life

January 7, 2006  |  Tags:   |  

Chickenham

Chicken skull wins.

Previous: Chicken vs Fried Chicken

Info: What’s with all the chickens?

Tags:

WordPress 2.0 FeedBurner plugin issues

January 7, 2006  |  Tags:   |  

I’ve been using Steve Smith’s WordPress Feedburner Plugin to send my feeds over to FeedBurner — it’s a simple mod_rewrite strategy that first rewrites a local feed into some secret random address, which you point FeedBurner’s aggregator at, and then sends all feed traffic from here to FeedBurner’s resultant page.

Only thing is, WordPress 2.0 seems to have mucked something up with their new permalink rewrite engine, resulting in an odd error: The secret random feed address gives a 404 error in FeedBurner (and FeedValidator), but shows the feed fine in web browsers. This apparently only occurs when one has set WordPress to deliver custom permalinks (e.g. site/archive/date/title, as opposed to site/index.php?p=5). Explanation, from an outdated FeedBurner support page:

The issue works this way because browsers are supposed to render the Error Document that is sent when a requested URL is not found; in this case, the Error Document itself will be the feed. But with web service systems, there is no benefit to rendring this file (as it is not a feed) so most of the systems (including ours) stop processing at the 404 error report.

Here are the solutions I’ve found so far from the plugin page comments (after searching for over an hour): Switch back to default permalinks in the WordPress options, or edit .htaccess manually, changing /wp-rss2.php [QSA,L] to /wp-rss2.php [QSA,R,L]. From what I know about mod_rewrite (not very much), the R stands for “redirect to new URL”… but that’s all I know. Anyway, I’ve adopted the latter solution, which is preferable because I don’t have to ruin my established permalink structure.

Hope that helps someone trying to find an answer to this issue.