A little while ago Andrew Powell of Universal Mind released the Chuck Norris Fact Web Service. This is a critical feature that has been missing from the Internet for some time. Frankly, I do not know how we have survived without the wisdom of Chuck Norris.

I whipped up a quick AIR application that you can run on your desktop. Every 5 seconds it will load a new pearl of wisdom from the man we know as Chuck. Please note that I'm way rusty with Adobe AIR. I haven't had the chance to play with it much lately, but dang it - I love that I was able to write this up in like 5 minutes. I spent more time making some dumb mistakes in Spry then I did on the "AIR-ness" of it. Enjoy. (As I still haven't updated IIS to let .air files worked, I renamed to a .zip.)

The entire code (minus Spry libraries) is below:

<html>

<head> <script type="text/javascript" src="AIRAliases.js"></script> <script type="text/javascript" src="spryjs/xpath.js"></script> <script type="text/javascript" src="spryjs/SpryData.js"></script>

<script type="text/javascript"> var myurl = "http://www.infoaccelerator.net/chuckFacts/FactService.cfc?method=getCurrentFact&returnformat=plain";

function callHandler(req){ var result = req.xhRequest.responseText; var sp = Spry.$("wisdom"); sp.innerText = result; }

function getWisdom(){ Spry.Utils.loadURL("GET", myurl, true, callHandler); }

function doLoad(){ getWisdom(); setInterval(getWisdom, 5000); } </script> <style> .wisdom { font-family: times; font-style: italic; } </style> </head>

<body onload="doLoad();"> <h3>The Wisdom of Chuck Norris</h3> <span id="wisdom" class="wisdom"></span> </body> </html>

Download attached file.