[mediawiki.debug] apply code conventions
authorKrinkle <krinkle@users.mediawiki.org>
Thu, 29 Dec 2011 23:49:38 +0000 (23:49 +0000)
committerKrinkle <krinkle@users.mediawiki.org>
Thu, 29 Dec 2011 23:49:38 +0000 (23:49 +0000)
commitb91705e5402a2e38c678a50df8844a5a50146376
treece4a808932d8001ff1891ed853ad042ff2e0bfa5
parent3c21d471ac44a122563fcb5d5f29077f1d719876
[mediawiki.debug] apply code conventions
* Quote "class"-key in object literals. It's stupid that JavaScript does not allow reserved words in this position but that's the way it is. As of ES5 (which Chrome/Firefox already started to implement) this is now part of the standard and no longer have to be quoted, still required for the browsers we support though.
* Fix usage of Array to Object. Arrays are for numeral keys only.
* Make usage of $() for building elements from HTML strings more consistent. Using shortag syntax for new elements creation. And valid HTML for snippets (as supposed to $("<div></div>") and $("<span class="foo">")). valid HTML is always okay, but shortag should only be used for creating plain elements (which jQuery recognizes and calls document-createElement for. Anything else goes into innerHTML which causes problems in browsers that require it to be valid and don't apply normalization.
* Remove empty style rule
* Moving declaration inside for-blocks to the function scope. JavaScript doesn't have just-in-time variables or block scope, only function scope.
* Apply general code conventions
* Follows-up r105122
resources/mediawiki/mediawiki.debug.css
resources/mediawiki/mediawiki.debug.js