r53373 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r53372‎ | r53373 | r53374 >
Date:18:27, 16 July 2009
Author:tparscal
Status:deferred
Tags:
Comment:
Minor comment adjustments.
Modified paths:
  • /trunk/extensions/UsabilityInitiative/EditWarning/EditWarning.js (modified) (history)

Diff [purge]

Index: trunk/extensions/UsabilityInitiative/EditWarning/EditWarning.js
@@ -1,11 +1,11 @@
22 /* JavaScript for EditWarning extension */
33
44 $( document ).ready( function() {
5 - // Checks if the skin is not vector
 5+ // Only use this function in conjuction with the Vector skin
66 if( skin != 'vector' )
7 - // Exits
87 return;
9 - // Gets the original values of some form elements
 8+
 9+ // Get the original values of some form elements
1010 $( '#wpTextbox1, #wpSummary' ).each( function() {
1111 $(this).data( 'origtext', $(this).val() );
1212 });
@@ -13,29 +13,29 @@
1414 fallbackWindowOnBeforeUnload = window.onbeforeunload;
1515 window.onbeforeunload = function() {
1616 var fallbackResult = null;
17 - // Checks if someone already set on onbeforunload hook
 17+ // Check if someone already set on onbeforunload hook
1818 if ( fallbackWindowOnBeforeUnload ) {
19 - // Gets the result of their onbeforeunload hook
 19+ // Get the result of their onbeforeunload hook
2020 fallbackResult = fallbackWindowOnBeforeUnload();
2121 }
22 - // Checks if their onbeforeunload hook returned something
 22+ // Check if their onbeforeunload hook returned something
2323 if ( fallbackResult !== null ) {
24 - // Exits here, returning their message
 24+ // Exit here, returning their message
2525 return fallbackResult;
2626 }
27 - // Checks if the current values of some form elements are the same as
 27+ // Check if the current values of some form elements are the same as
2828 // the original values
2929 if(
3030 $( '#wpTextbox1' ).data( 'origtext' ) != $( '#wpTextbox1' ).val() ||
3131 $( '#wpSummary' ).data( 'origtext' ) != $( '#wpSummary' ).val()
3232 ) {
33 - // Returns our message
 33+ // Return our message
3434 return gM( 'editwarning-warning' );
3535 }
3636 }
37 - // Adds form submission handler
 37+ // Add form submission handler
3838 $( 'form' ).submit( function() {
39 - // Restores whatever previous onbeforeload hook existed
 39+ // Restore whatever previous onbeforeload hook existed
4040 window.onbeforeunload = fallbackWindowOnBeforeUnload;
4141 });
4242 });

Status & tagging log