r81273 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r81272‎ | r81273 | r81274 >
Date:21:13, 31 January 2011
Author:reedy
Status:deferred
Tags:
Comment:
Some missing semi-colons from extensions
Modified paths:
  • /trunk/extensions/AjaxQueryPages/AjaxQueryPages.js (modified) (history)
  • /trunk/extensions/AjaxShowEditors/AjaxShowEditors.js (modified) (history)
  • /trunk/extensions/ArticleFeedback/modules/jquery.articleFeedback/jquery.articleFeedback.js (modified) (history)
  • /trunk/extensions/Collection/js/jquery.ui.js (modified) (history)
  • /trunk/extensions/Collection/js/jstorage.js (modified) (history)
  • /trunk/extensions/Configure/Configure.js (modified) (history)
  • /trunk/extensions/ContributorsAddon/ContributorsAddon.js (modified) (history)
  • /trunk/extensions/LiquidThreads/jquery/js2.combined.js (modified) (history)
  • /trunk/extensions/LiquidThreads/newmessages.js (modified) (history)
  • /trunk/extensions/UploadWizard/resources/combined.min.js (modified) (history)
  • /trunk/extensions/UploadWizard/resources/mw.UploadApiProcessor.js (modified) (history)
  • /trunk/extensions/UploadWizard/test/jasmine/spec/mediawiki.language.parser.spec.js (modified) (history)
  • /trunk/extensions/WikiBhasha/src/js/core/shareWikiBhasha.js (modified) (history)
  • /trunk/extensions/WikimediaMobile/tests/user_agent.js (modified) (history)

Diff [purge]

Index: trunk/extensions/Collection/js/jquery.ui.js
@@ -83,7 +83,7 @@
8484 continue;var t=this.options.toleranceElement?$(this.options.toleranceElement,this.items[i].item):this.items[i].item;if(!fast){this.items[i].width=t[0].offsetWidth;this.items[i].height=t[0].offsetHeight;}
8585 var p=t.offset();this.items[i].left=p.left;this.items[i].top=p.top;};if(this.options.custom&&this.options.custom.refreshContainers){this.options.custom.refreshContainers.call(this);}else{for(var i=this.containers.length-1;i>=0;i--){var p=this.containers[i].element.offset();this.containers[i].containerCache.left=p.left;this.containers[i].containerCache.top=p.top;this.containers[i].containerCache.width=this.containers[i].element.outerWidth();this.containers[i].containerCache.height=this.containers[i].element.outerHeight();};}},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");this._mouseDestroy();for(var i=this.items.length-1;i>=0;i--)
8686 this.items[i].item.removeData("sortable-item");},_createPlaceholder:function(that){var self=that||this,o=self.options;if(!o.placeholder||o.placeholder.constructor==String){var className=o.placeholder;o.placeholder={element:function(){var el=$(document.createElement(self.currentItem[0].nodeName)).addClass(className||"ui-sortable-placeholder")[0];if(!className){el.style.visibility="hidden";document.body.appendChild(el);el.innerHTML=self.currentItem[0].innerHTML;document.body.removeChild(el);};return el;},update:function(container,p){if(className&&!o.forcePlaceholderSize)return;if(!p.height()){p.height(self.currentItem.innerHeight()-parseInt(self.currentItem.css('paddingTop')||0,10)-parseInt(self.currentItem.css('paddingBottom')||0,10));};if(!p.width()){p.width(self.currentItem.innerWidth()-parseInt(self.currentItem.css('paddingLeft')||0,10)-parseInt(self.currentItem.css('paddingRight')||0,10));};}};}
87 -self.placeholder=$(o.placeholder.element.call(self.element,self.currentItem))
 87+self.placeholder=$(o.placeholder.element.call(self.element,self.currentItem));
8888 self.currentItem.parent()[0].appendChild(self.placeholder[0]);self.placeholder[0].parentNode.insertBefore(self.placeholder[0],self.currentItem[0]);o.placeholder.update(self,self.placeholder);},_contactContainers:function(e){for(var i=this.containers.length-1;i>=0;i--){if(this._intersectsWith(this.containers[i].containerCache)){if(!this.containers[i].containerCache.over){if(this.currentContainer!=this.containers[i]){var dist=10000;var itemWithLeastDistance=null;var base=this.positionAbs[this.containers[i].floating?'left':'top'];for(var j=this.items.length-1;j>=0;j--){if(!contains(this.containers[i].element[0],this.items[j].item[0]))continue;var cur=this.items[j][this.containers[i].floating?'left':'top'];if(Math.abs(cur-base)<dist){dist=Math.abs(cur-base);itemWithLeastDistance=this.items[j];}}
8989 if(!itemWithLeastDistance&&!this.options.dropOnEmpty)
9090 continue;this.currentContainer=this.containers[i];itemWithLeastDistance?this.options.sortIndicator.call(this,e,itemWithLeastDistance,null,true):this.options.sortIndicator.call(this,e,null,this.containers[i].element,true);this._propagate("change",e);this.containers[i]._propagate("change",e,this);this.options.placeholder.update(this.currentContainer,this.placeholder);}
Index: trunk/extensions/Collection/js/jstorage.js
@@ -94,7 +94,7 @@
9595 }
9696 /* Check if browser supports userData behavior */
9797 else{
98 - this._storage_elm = document.createElement('link')
 98+ this._storage_elm = document.createElement('link');
9999 if("addBehavior" in this._storage_elm){
100100
101101 /* Use a DOM element to act as userData storage */
Index: trunk/extensions/WikimediaMobile/tests/user_agent.js
@@ -24,27 +24,27 @@
2525 shouldIgnore("Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_6; en-us) AppleWebKit/533.19.4 (KHTML, like Gecko) Version/5.0.3 Safari/533.19.4");
2626 // Chrome on OS X
2727 shouldIgnore("Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_6; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.237 Safari/534.10");
28 -}
 28+};
2929
3030 var doesMatch = function(user_agent) {
31 - return regex.test(user_agent);
32 -}
 31+ return regex.test(user_agent);
 32+};
3333
3434 var runTest = function(user_agent, should_be) {
3535 var result = doesMatch(user_agent);
3636 if(result == should_be) {
37 - print("OK")
 37+ print("OK");
3838 } else {
39 - print("FAIL: '" + user_agent + "'")
 39+ print("FAIL: '" + user_agent + "'");
4040 }
41 -}
 41+};
4242
4343 var shouldRedirect = function(user_agent) {
44 - runTest(user_agent, true);
45 -}
 44+ runTest(user_agent, true);
 45+};
4646
4747 var shouldIgnore = function(user_agent) {
48 - runTest(user_agent, false);
49 -}
 48+ runTest(user_agent, false);
 49+};
5050
5151 runTests();
Index: trunk/extensions/WikiBhasha/src/js/core/shareWikiBhasha.js
@@ -98,7 +98,7 @@
9999 return message;
100100 }
101101 }
102 -}
 102+};
103103
104104 wbShareOnExternSystem = wikiBhasha.windowManagement.shareOnExternSystemWindow;
105105
Index: trunk/extensions/LiquidThreads/jquery/js2.combined.js
@@ -8156,4 +8156,4 @@
81578157 */
81588158 mw.addOnloadHook = function( func ) {
81598159 $j(document).ready( func );
8160 -}
 8160+};
Index: trunk/extensions/LiquidThreads/newmessages.js
@@ -85,7 +85,7 @@
8686 var spinner = $j('<div class="mw-ajax-loader"/>');
8787 $j(form).prepend( spinner );
8888
89 - liquidThreads.apiRequest
 89+ liquidThreads.apiRequest;
9090
9191 var markReadParameters =
9292 {
Index: trunk/extensions/AjaxShowEditors/AjaxShowEditors.js
@@ -15,7 +15,7 @@
1616 }
1717
1818 wgAjaxShowEditors.allowRefresh();
19 -}
 19+};
2020
2121
2222 // Ask for new data & update UI
@@ -38,7 +38,7 @@
3939 if(!ShowEditorsCounting) {
4040 wgAjaxShowEditors.countup();
4141 }
42 -}
 42+};
4343
4444 wgAjaxShowEditors.countup = function() {
4545 ShowEditorsCounting = true;
@@ -53,12 +53,12 @@
5454 }
5555 }
5656 setTimeout( "wgAjaxShowEditors.countup()", 1000 );
57 -}
 57+};
5858
5959 // callback to allow refresh
6060 wgAjaxShowEditors.allowRefresh = function() {
6161 canRefresh = true;
62 -}
 62+};
6363
6464 // Register our initialization function.
6565 hookEvent( "load", wgAjaxShowEditors.onLoad);
Index: trunk/extensions/Configure/Configure.js
@@ -285,7 +285,7 @@
286286 return;
287287 }
288288
289 - var isMatch = function(element) { return element.description.indexOf( query ) !== -1; }
 289+ var isMatch = function(element) { return element.description.indexOf( query ) !== -1; };
290290 for( var i=0; i<allSettings.length; ++i ) {
291291 var data = allSettings[i];
292292 if ( isMatch( data ) ) {
@@ -365,7 +365,7 @@
366366 // Based on class, do something.
367367 var elementType = ' '+div.className+' ';
368368
369 - var isType = function(type) { return elementType.indexOf( ' '+type+' ' ) !== -1; }
 369+ var isType = function(type) { return elementType.indexOf( ' '+type+' ' ) !== -1; };
370370
371371 if ( isType('assoc') ) {
372372 // If it's too big to display as an associative array, it's too big to display as a summary.
Index: trunk/extensions/ArticleFeedback/modules/jquery.articleFeedback/jquery.articleFeedback.js
@@ -358,7 +358,7 @@
359359 for ( var key in context.options.pitches ) {
360360 // Dont' bother checking the condition if there's a cookie that says
361361 // the user has rejected this within 3 days of right now
362 - var display = $.cookie( 'jquery.articleFeedback.pitch.' + key )
 362+ var display = $.cookie( 'jquery.articleFeedback.pitch.' + key );
363363 if ( display !== 'hide' && context.options.pitches[key].condition() ) {
364364 context.$ui
365365 .find( '.articleFeedback-pitch[rel="' + key + '"]' )
Index: trunk/extensions/ContributorsAddon/ContributorsAddon.js
@@ -46,11 +46,11 @@
4747 function findPos(obj) {
4848 var curleft = curtop = 0;
4949 if (obj.offsetParent) {
50 - curleft = obj.offsetLeft
51 - curtop = obj.offsetTop
 50+ curleft = obj.offsetLeft;
 51+ curtop = obj.offsetTop;
5252 while (obj = obj.offsetParent) {
53 - curleft += obj.offsetLeft
54 - curtop += obj.offsetTop
 53+ curleft += obj.offsetLeft;
 54+ curtop += obj.offsetTop;
5555 }
5656 }
5757 return [curleft,curtop];
Index: trunk/extensions/UploadWizard/test/jasmine/spec/mediawiki.language.parser.spec.js
@@ -236,19 +236,19 @@
237237 */
238238 mw.Language.resetForLang = function( lang, fn ) {
239239 mw.Language.digitTransformTable = null;
240 - // Load the current language js file if it has a langKey
 240+ // Load the current language js file if it has a langKey
241241 var lang = mw.Language.getLangTransformKey( lang );
242242 if( cachedConvertPlural[lang] ) {
243243 mw.Language.convertPlural = cachedConvertPlural[lang];
244244 fn();
245 - } else {
 245+ } else {
246246 mw.log( lang + " load msg transform" );
247247 $j.getScript( wgScriptPath + '/resources/mediawiki.language/languages/' + lang.toLowerCase() + '.js' , function(){
248248 cachedConvertPlural[lang] = mw.Language.convertPlural;
249249 fn();
250 - });
 250+ });
251251 }
252 - }
 252+ };
253253
254254
255255 $j.each( jasmineMsgSpec, function( i, test ) {
Index: trunk/extensions/UploadWizard/resources/mw.UploadApiProcessor.js
@@ -185,7 +185,7 @@
186186
187187
188188 }
189 - */
 189+ * /;
190190
191191 /*
192192 // this doesn't seem to do anything
Index: trunk/extensions/UploadWizard/resources/combined.min.js
@@ -7677,7 +7677,7 @@
76787678 mw.addTemplateTransform({
76797679 'PLURAL':mw.Language.procPLURAL,
76807680 'GENDER':mw.Language.procGENDER
7681 -})
 7681+});
76827682
76837683 mw.Language.doneSetup=true;
76847684 }
Index: trunk/extensions/AjaxQueryPages/AjaxQueryPages.js
@@ -33,7 +33,7 @@
3434
3535 els[i].setAttribute("href", "javascript:wgAjaxQueryPages.call(" + jsparams + ")");
3636 }
37 -}
 37+};
3838
3939 wgAjaxQueryPages.call = function( offset, limit, dir ) {
4040 if( wgAjaxQueryPages.inprogress )
@@ -48,7 +48,7 @@
4949 // Reallow request if it is not done in 2 seconds
5050 wgAjaxQueryPages.timeoutID = window.setTimeout( function() { wgAjaxQueryPages.inprogress = false; }, 2000);
5151
52 -}
 52+};
5353
5454 html2dom = function( html ) {
5555 var ret = document.createDocumentFragment();
@@ -59,7 +59,7 @@
6060 ret.appendChild( tmp.firstChild );
6161 }
6262 return ret;
63 -}
 63+};
6464
6565 wgAjaxQueryPages.processResult = function(request) {
6666 // convert html to dom, need to merge branches/hashar@21917 to use the responseXML
@@ -70,6 +70,6 @@
7171 spcontent[0].innerHTML = response.firstChild.innerHTML ;
7272
7373 wgAjaxQueryPages.inprogress = false;
74 -}
 74+};
7575
7676 hookEvent( "load", wgAjaxQueryPages.onLoad );

Status & tagging log