r77926 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r77925‎ | r77926 | r77927 >
Date:22:34, 6 December 2010
Author:reedy
Status:ok
Tags:
Comment:
(bug 26265) Many semicolons are missing from JavaScript files

And some more unterminated statements..
Modified paths:
  • /trunk/phase3/resources/jquery/jquery.collapsibleTabs.js (modified) (history)
  • /trunk/phase3/resources/jquery/jquery.textSelection.js (modified) (history)
  • /trunk/phase3/resources/mediawiki.language/languages/bs.js (modified) (history)
  • /trunk/phase3/resources/mediawiki.language/languages/mt.js (modified) (history)
  • /trunk/phase3/resources/mediawiki/mediawiki.js (modified) (history)
  • /trunk/phase3/skins/common/wikibits.js (modified) (history)

Diff [purge]

Index: trunk/phase3/skins/common/wikibits.js
@@ -763,7 +763,7 @@
764764 if ( ts_alternate_row_colors ) {
765765 ts_alternate( table );
766766 }
767 -}
 767+};
768768
769769 window.ts_initTransformTable = function() {
770770 if ( typeof wgSeparatorTransformTable == 'undefined'
@@ -816,11 +816,11 @@
817817 "[-+\u2212]?" + digitClass + "+%?" + // Generic localised
818818 ")$", "i"
819819 );
820 -}
 820+};
821821
822822 window.ts_toLowerCase = function( s ) {
823823 return s.toLowerCase();
824 -}
 824+};
825825
826826 window.ts_dateToSortKey = function( date ) {
827827 // y2k notes: two digit years less than 50 are treated as 20XX, greater than 50 are treated as 19XX
@@ -885,7 +885,7 @@
886886 }
887887 }
888888 return '00000000';
889 -}
 889+};
890890
891891 window.ts_parseFloat = function( s ) {
892892 if ( !s ) {
@@ -906,15 +906,15 @@
907907 }
908908 var num = parseFloat( s.replace(/[, ]/g, '').replace("\u2212", '-') );
909909 return ( isNaN( num ) ? -Infinity : num );
910 -}
 910+};
911911
912912 window.ts_currencyToSortKey = function( s ) {
913913 return ts_parseFloat(s.replace(/[^-\u22120-9.,]/g,''));
914 -}
 914+};
915915
916916 window.ts_sort_generic = function( a, b ) {
917917 return a[1] < b[1] ? -1 : a[1] > b[1] ? 1 : a[2] - b[2];
918 -}
 918+};
919919
920920 window.ts_alternate = function( table ) {
921921 // Take object table and get all it's tbodies.
@@ -937,7 +937,7 @@
938938 tableRows[j].className = newClassName + ( j % 2 == 0 ? 'even' : 'odd' );
939939 }
940940 }
941 -}
 941+};
942942
943943 /*
944944 * End of table sorting code
@@ -997,7 +997,7 @@
998998 messageDiv.innerHTML = message;
999999 }
10001000 return true;
1001 -}
 1001+};
10021002
10031003 /**
10041004 * Inject a cute little progress spinner after the specified element
@@ -1015,7 +1015,7 @@
10161016 } else {
10171017 element.parentNode.appendChild( spinner );
10181018 }
1019 -}
 1019+};
10201020
10211021 /**
10221022 * Remove a progress spinner added with injectSpinner()
@@ -1027,7 +1027,7 @@
10281028 if( spinner ) {
10291029 spinner.parentNode.removeChild( spinner );
10301030 }
1031 -}
 1031+};
10321032
10331033 window.runOnloadHook = function() {
10341034 // don't run anything below this for non-dom browsers
@@ -1047,7 +1047,7 @@
10481048 for ( var i = 0; i < onloadFuncts.length; i++ ) {
10491049 onloadFuncts[i]();
10501050 }
1051 -}
 1051+};
10521052
10531053 /**
10541054 * Add an event handler to an element
@@ -1062,11 +1062,11 @@
10631063 } else if( element.attachEvent ) {
10641064 element.attachEvent( 'on' + attach, handler );
10651065 }
1066 -}
 1066+};
10671067
10681068 window.hookEvent = function( hookName, hookFunct ) {
10691069 addHandler( window, hookName, hookFunct );
1070 -}
 1070+};
10711071
10721072 /**
10731073 * Add a click event handler to an element
@@ -1076,7 +1076,7 @@
10771077 */
10781078 window.addClickHandler = function( element, handler ) {
10791079 addHandler( element, 'click', handler );
1080 -}
 1080+};
10811081
10821082 /**
10831083 * Removes an event handler from an element
@@ -1091,7 +1091,7 @@
10921092 } else if( window.detachEvent ) {
10931093 element.detachEvent( 'on' + remove, handler );
10941094 }
1095 -}
 1095+};
10961096 // note: all skins should call runOnloadHook() at the end of html output,
10971097 // so the below should be redundant. It's there just in case.
10981098 hookEvent( 'load', runOnloadHook );
Index: trunk/phase3/resources/jquery/jquery.textSelection.js
@@ -173,7 +173,7 @@
174174 if ( preRange.compareEndPoints( "StartToEnd", preRange ) == 0 ) {
175175 preFinished = true;
176176 } else {
177 - preRange.moveEnd( "character", -1 )
 177+ preRange.moveEnd( "character", -1 );
178178 if ( preRange.text == preText ) {
179179 rawPreText += "\r\n";
180180 } else {
Index: trunk/phase3/resources/jquery/jquery.collapsibleTabs.js
@@ -112,4 +112,4 @@
113113 $.collapsibleTabs.handleResize();
114114 }
115115 };
116 -} )( jQuery )
\ No newline at end of file
 116+} )( jQuery );
\ No newline at end of file
Index: trunk/phase3/resources/mediawiki/mediawiki.js
@@ -910,7 +910,7 @@
911911 return formatVersionNumber( registry[module].version );
912912 }
913913 return null;
914 - }
 914+ };
915915
916916 /* Cache document ready status */
917917
@@ -954,7 +954,7 @@
955955 */
956956 this.Cdata = function( value ) {
957957 this.value = value;
958 - }
 958+ };
959959
960960 /**
961961 * Create an HTML element string, with safe escaping.
Index: trunk/phase3/resources/mediawiki.language/languages/bs.js
@@ -17,4 +17,4 @@
1818 default:
1919 return forms[2];
2020 }
21 -}
 21+};
Index: trunk/phase3/resources/mediawiki.language/languages/mt.js
@@ -14,4 +14,4 @@
1515 return forms[2];
1616 }
1717 return forms[3];
18 -}
 18+};

Follow-up revisions

RevisionCommit summaryAuthorDate
r77928Some more unterminated statements (bug 26265)reedy22:51, 6 December 2010
r77932Wikibasha: bug 26265 - Missing ; from JSreedy23:32, 6 December 2010

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r77872bug 26265, a few explicit ; at end of blocksreedy12:18, 6 December 2010
r77922(bug 26265) Many semicolons are missing from JavaScript files...reedy22:29, 6 December 2010
r77923(bug 26265) Many semicolons are missing from JavaScript files...reedy22:30, 6 December 2010
r77924(bug 26265) Many semicolons are missing from JavaScript files...reedy22:30, 6 December 2010

Status & tagging log