Sportsfox is a Firefox extension that allows you to keep your sports scores in a handy browser location. Sportsfox includes scores for NFL, NBA, WNBA, NHL, College Football, Men's College Basketball, and Women's College Basketball. Generally you should be able to download the latest version at Mozilla addons

Wednesday, April 15, 2009

sportsFox Being Updated

I have started cleaning up the code a little to get it up to "code" to be approved. It actually isn't as much of a re-write when I actually got into it. I did combine 3 javascript files into one though, because I couldn't figure out how to get them all to work with the new coding standards/methodology.

Basically, if I have 3 javascript files and I want all of them to belong to the same "package", how do I do that? Because if I code each of them the same way, the initial declaration in one package seems to blow away the declaration of another. And the same with the "pub"lic vars. I will have to see if there is some forum discussing this. I'm sure there is.

The code is actually kind of cool for javascript. Now if there was only a javascript IDE with Intellisense. That would be awesome!

The basic code that I am using  Mark Ziesemer came up with.  It basically lets me "wrap up" all of my "loose" javascript variables into a namespace and then access just the ones I make public from the XUL Chrome.  It's pretty cool.  Here is Mark's example:

if(!com) var com={};
if(!com.ziesemer) com.ziesemer={};

com.ziesemer.myPackage = function(){
var pub = {}; = "visitor";
pub.greeting = "hello " +;
pub.alertHello = function(){
return pub;


of couse com.ziesemer belongs to Mark, so your should be "com.yourname" or whatever..

No comments:

Post a Comment