oskarkrawczyk/heyoffline.js — pull request #21 by ryhan (2013-04-13 06:57:33+00:00)
Title: Scoped helper functions

Moved `extend`, `addEvent`, `setStyles`, and `destroy` out of global scope.

Some minor other changes:
- Favored use of "unless" over "if not"
- When starting from offline state, going online used to raise an error
when calling destroy. Fixed by checking if element has a parent (in
other words, was the modal appended to body).
- Adjusted copy to be slightly more succinct.
- Used CoffeeScript 1.6.x over 1.4.x