Breaking the NIE practicum webpage
Saturday, January 28th, 2006The 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: nie









