JavaScript clean-up (Code conventions, cross-browser fixes and JSHint validation)
authorKrinkle <krinkle@users.mediawiki.org>
Fri, 4 Mar 2011 00:15:03 +0000 (00:15 +0000)
committerKrinkle <krinkle@users.mediawiki.org>
Fri, 4 Mar 2011 00:15:03 +0000 (00:15 +0000)
commit8a5a4b200dc89b6dbdc4cd5fd309d84d6c6914fe
tree6305f0fdcdaa962205d7ad1b55160f2c5d5fd3b7
parent630cc8a1ebf7d5606c215ba15a8afa5a62ed04f2
JavaScript clean-up (Code conventions, cross-browser fixes and JSHint validation)

; history.js
* Applied whitespace conventions + removed trailing whitespace
* Combining var statements

; mediawiki.action.history.js
* Calling in document.ready instead of directly (jQuery(fn) is short for jQuery(document).ready(fn))
** Originally it was a hookEvent('load'), during rewrite in r74397 it was dropped. Restoring now.
* Wrapping in jQuery-to-$
* Combining document.ready and wrapper into one (jQuery internally calls the ready-fn with jQuery as first argument) ($(function(){ $(function(){ /* domready */ })(jQuery); --> jQuery( function( $ ) { /* domready */ } );
* (http://jqbug.com/8229) Attributes must be quoted, just like CSS requires that.

; mediawiki.action.view.rightClickEdit.js
* Wrapping in jQuery-to-$

; IEFixes.js
* Moving function calls within the if statement since the passed arguments are undefined otherwise
resources/mediawiki.action/mediawiki.action.history.js
resources/mediawiki.action/mediawiki.action.view.rightClickEdit.js
skins/common/IEFixes.js
skins/common/history.js