Warning: Undefined variable $HTTP_USER_AGENT in /var/www/vhosts/basil/kbsite/blog/wp-content/themes/redesign/image_switcher.php on line 3
Kevin Basil

Sure, evolution as such is not to be found in the book containing what God gave Moses as an explanation of origins suitable for illiterate nomads. No, and beer is not mentioned in the Bible either, though man has been making it for about twelve centuries.
Bishop Tikhon of San Francisco, Los Angeles and the West

«— WiFi? Here?
—» Keep Your Confederate Dollars, Boys!

Show Me the Money!

Link to this post  


Warning: Undefined property: linknotes::$are_links in /var/www/vhosts/basil/kbsite/blog/wp-content/plugins/linknotes.php on line 73
Share with your friends and followers:
Share

At work, I’ve been looking for ways to make our broken intranet pages work with a browser that complies with web standards. Recently, Tim pointed out a bookmarklet that allows the user to toggle styles. It’s pretty groovy, and I was hoping it might allow me to use those unusable pages.

The problem is that these pages rely on the Microsoft Internet Explorer Event model, which conflicts with the DOM Level 2 Event specification published by the World Wide Web Consortium (W3C). They listen for a mouse click event in the wrong place, so in a standards-compliant browser the code to handle that event never gets called. (Forget that they’re hideous beyond repair as HTML.) This means that the content which is hidden, waiting for me to click, just stays in hiding. (Don’t ask me why they hid it. Maybe it was embarassing.) It looks sorta like this, except that I wrote that page to be a standards-compliant version.

Unfortunately, that toggle styles bookmarklet did not go far enough. What I needed was for it to toggle the display properties of the document’s div tags. At first I tried hacking the original bookmarklet, but I quickly realized that toggling the display property on every div leads to a lot of AWOL content. Clearly the Wrong Thing® to do. What I needed was something that set the display property on every div to block.

*** basil does the happy dance ***

Here it is: Show all DIVs. Enjoy.

Share with your friends and followers:
Share
Share

Filed under: — Basil @ 7:56 pm