Centurion drinking game timer

A little while ago, I wrote the Centurion drinking game timer to help out some fellow students at university who couldn’t find a suitable timer to use which would also be easy to follow after quite a few shots!

These few days, as part of my unofficial look-back and improvement of scripts drive, I had a look at Centurion again, and managed to simplify the script and the page. At the same time, I also added a full screen timer option to make it easier to see the countdown. I used some of my experiences with vCardMaker when making this, although I have to check it out in Internet Explorer to see how much it breaks!

The two scripts I’ve been blogging about recently are the ones I’m going to concentrate on, making them better and also cross-platform/browser compatible. I also have an idea to improve my JavaScript include script to compress its output using Dean Edwards’ excellent Packer tool.

Wrangling with Google AdSense

For the past couple of days, I’ve been trying to tame Google’s AdSense adverts on my site. I decided a few months ago to gradually introduce a few non-intrusive Google adverts to the site as a precursor to a course I’ll be doing at university during the summer.

I’m a bit of a standards freak, and I serve all the pages on this site as proper XHTML with the correct MIME type of application/xhtml+xml (except for Internet Explorer, but that’s a whole different ball game). However, lo-and-behold, Google’s adverts don’t work with pages served like this, since they use some outdated JavaScript techniques to inject the adverts into the page.

I searched up and down (ironically using Google’s web search) to find a solution to this problem. The best I’ve found so far is to include the adverts on a separate page marked up as regular HTML and served as text/html, and then include this in your (valid) page using an <object> tag. It seems a little backwards, but it does the trick well enough.

Don’t you think it’s time that Google joined the 21st century and supported valid markup?