Wrapped the functionality in a class. Also, changed the box sizes to exactly match GitHub.

The box sizes on GitHub are 11px square with a 2px margin. This is easily seen with an 'Inspect Element' in Chrome or similar.

I also wrapped the functionality in a class for easier deployment on a site.