onei/script — pull request #1 by Matthew2602 (2013-06-28 00:05:16+00:00)
Title: General cleanup of common.js

- I encased the whole script in an anonymous function because there was really no reason not to. Any variables that we want exposed globally eg. `setCookie`, `getCookie`, `callAPI` etc. we can just manually expose, which is what I've done.
- I got rid of those individual `wg` variables you had cached and created a single `mwConfig` object which we can reference values by doing, for example, `mwConfig.wgPageName`. Individually caching values like you were was quite messy and un-maintainable, and this way we can achieve the same effect without declaring all those variables.
- I did a bunch of general trivial cleanup all over the place, just making things cleaner.