r81275 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r81274‎ | r81275 | r81276 >
Date:21:26, 31 January 2011
Author:reedy
Status:ok
Tags:
Comment:
More missing semi-colons from extensions
Modified paths:
  • /trunk/extensions/DSMW/specials/SPFunctions.js (modified) (history)
  • /trunk/extensions/Drafts/Drafts.js (modified) (history)
  • /trunk/extensions/GoogleMaps/EditorsMap.js (modified) (history)
  • /trunk/extensions/HeaderTabs/skins/headertabs.js (modified) (history)
  • /trunk/extensions/ImageTagging/img_tagging.js (modified) (history)
  • /trunk/extensions/SVGEdit/modules/ext.svgedit.embedapi.js (modified) (history)
  • /trunk/extensions/SVGEdit/modules/ext.svgedit.formmultipart.js (modified) (history)
  • /trunk/extensions/SVGZoom/src/svg-uncompressed.js (modified) (history)
  • /trunk/extensions/TalkHere/TalkHere.js (modified) (history)
  • /trunk/extensions/TreeAndMenu/dtree.js (modified) (history)
  • /trunk/extensions/WikiAtHome/WikiAtHome.js (modified) (history)
  • /trunk/extensions/WikiTrust/js/tip_centerwindow.js (modified) (history)
  • /trunk/extensions/WikiTrust/js/tip_followscroll.js (modified) (history)
  • /trunk/extensions/skins/Donate/main.js (modified) (history)
  • /trunk/extensions/skins/Schulenburg/main.js (modified) (history)
  • /trunk/extensions/skins/Tomas/main.js (modified) (history)

Diff [purge]

Index: trunk/extensions/WikiAtHome/WikiAtHome.js
@@ -136,7 +136,7 @@
137137 //set the initial stats layout
138138 $j('#tab-stats').html(
139139 '<h2>Some Cool Visual Stats Go here!</h2>'
140 - )
 140+ );
141141
142142 //set tabs to initial layout
143143 $j('#tab-jobs').html(
@@ -214,7 +214,7 @@
215215 $j('#tab-jobs .wah-gen-status').html( gM( 'wah-nojobfound', seconds2npt( _this.jobsearch_delay - i )) );
216216 }
217217 setTimeout(delayJobUpdate, 1000);
218 - }
 218+ };
219219 setTimeout(delayJobUpdate, 1000);
220220 },
221221 doProccessJob:function( job ){
@@ -274,7 +274,7 @@
275275 }else if( _this.fogg.state == "download failed"){
276276 mw.log('download state failed');
277277 }
278 - }
 278+ };
279279
280280 //do the initial call to downloading state updates
281281 if( _this.fogg.state == 'downloading'){
@@ -307,7 +307,7 @@
308308 return false;
309309 }
310310 setTimeout(updateEncodeState, 100);
311 - }
 311+ };
312312 //our updateUploadState update
313313 var updateUploadState = function(){
314314 _this.updateProgress( _this.fogg.progress(), 'wah-uploading');
@@ -340,7 +340,7 @@
341341
342342 var getNextTranscodeJob = function(){
343343 _this.lookForJob( job.job_set_id );
344 - }
 344+ };
345345 //display the msg for 10 seconds
346346 setTimeout(getNextTranscodeJob, 10000);
347347 }else{
Index: trunk/extensions/TreeAndMenu/dtree.js
@@ -39,7 +39,7 @@
4040 useStatusText : false,
4141 closeSameLevel : false,
4242 inOrder : false
43 - }
 43+ };
4444 this.icon = {
4545 root : 'img/base.gif',
4646 folder : 'img/folder.gif',
@@ -215,7 +215,7 @@
216216 dTree.prototype.oAll = function(status) {
217217 for (var n=0; n<this.aNodes.length; n++) {
218218 if (this.aNodes[n]._hc && this.aNodes[n].pid != this.root.id) {
219 - this.nodeStatus(status, n, this.aNodes[n]._ls)
 219+ this.nodeStatus(status, n, this.aNodes[n]._ls);
220220 this.aNodes[n]._io = status;
221221 }
222222 }
@@ -251,7 +251,7 @@
252252 this.closeAllChildren(this.aNodes[n]);
253253 }
254254 }
255 -}
 255+};
256256
257257 // Closes all children of a node
258258 dTree.prototype.closeAllChildren = function(node) {
@@ -259,10 +259,10 @@
260260 if (this.aNodes[n].pid == node.id && this.aNodes[n]._hc) {
261261 if (this.aNodes[n]._io) this.nodeStatus(false, n, this.aNodes[n]._ls);
262262 this.aNodes[n]._io = false;
263 - this.closeAllChildren(this.aNodes[n]);
 263+ this.closeAllChildren(this.aNodes[n]);
264264 }
265265 }
266 -}
 266+};
267267
268268 // Change the status of a node(open or closed)
269269 dTree.prototype.nodeStatus = function(status, id, bottom) {
Index: trunk/extensions/Drafts/Drafts.js
@@ -23,11 +23,11 @@
2424 * Sets the state of the draft
2525 * @param {String} newState
2626 */
27 - this.setState = function( newState ) {
 27+ this.setState = function(newState) {
2828 // Stores state information
2929 state = newState;
3030 // Updates UI elements
31 - switch ( state ) {
 31+ switch (state) {
3232 case 'unchanged':
3333 form.wpDraftSave.disabled = true;
3434 form.wpDraftSave.value = messages.saveDraft;
@@ -50,21 +50,21 @@
5151 break;
5252 default: break;
5353 }
54 - }
 54+ };
5555
5656 /**
5757 * Gets the state of the draft
5858 */
5959 this.getState = function() {
6060 return state;
61 - }
 61+ };
6262
6363 /**
6464 * Sends draft data to server to be saved
6565 */
6666 this.save = function() {
6767 // Checks if a save is already taking place
68 - if ( state == 'saving' ) {
 68+ if (state == 'saving') {
6969 // Exits function immediately
7070 return;
7171 }
@@ -100,7 +100,7 @@
101101 );
102102 // Ensure timer is cleared in case we saved manually before it expired
103103 clearTimeout( timer );
104 - }
 104+ };
105105
106106 /**
107107 * Updates the user interface to represent being out of sync with the server
@@ -120,7 +120,7 @@
121121 'wgDraft.save()', configuration.autoSaveWait * 1000
122122 );
123123 }
124 - }
 124+ };
125125
126126 /**
127127 * Initializes the user interface
@@ -157,7 +157,7 @@
158158 error: form.wpMsgError.value
159159 };
160160 }
161 - }
 161+ };
162162
163163 /**
164164 * Responds to the server after a save request has been handled
Index: trunk/extensions/GoogleMaps/EditorsMap.js
@@ -1093,7 +1093,7 @@
10941094 }
10951095 }
10961096
1097 - this.setType(type)
 1097+ this.setType(type);
10981098
10991099 for(i=0;i<map_types_orig.length;i++) {
11001100 if (!map_types_check[old_world+map_types_orig[i].getName()]) {
Index: trunk/extensions/TalkHere/TalkHere.js
@@ -16,7 +16,7 @@
1717 div.style.display= 'block';
1818 lnk.innerHTML= talkHereCollapseMsg;
1919 lnk.title= talkHereCollapseMsg;
20 - lnk.onclick= function() { talkHereCollapseEditor(lnk, div, page, section, returnto) }
 20+ lnk.onclick= function() { talkHereCollapseEditor(lnk, div, page, section, returnto) };
2121
2222 if (div.innerHTML.length < 200) {
2323 talkHereLoadEditor(lnk, div, page, section, returnto);
@@ -40,7 +40,7 @@
4141 div.style.display= 'block';
4242 lnk.innerHTML= talkHereCollapseMsg;
4343 lnk.title= talkHereCollapseMsg;
44 - lnk.onclick= function() { talkHereCollapseEditor(lnk, div, page, section, returnto) }
 44+ lnk.onclick= function() { talkHereCollapseEditor(lnk, div, page, section, returnto) };
4545
4646 talkHereLoadEditorHTML(div, page, section, returnto)
4747 }
Index: trunk/extensions/WikiTrust/js/tip_centerwindow.js
@@ -28,8 +28,8 @@
2929 // created.
3030
3131 //=================== GLOBAL TOOLTIP CONFIGURATION =========================//
32 -config. CenterWindow = false // true or false - set to true if you want this to be the default behaviour
33 -config. CenterAlways = false // true or false - recenter if window is resized or scrolled
 32+config.CenterWindow = false; // true or false - set to true if you want this to be the default behaviour
 33+config.CenterAlways = false; // true or false - recenter if window is resized or scrolled
3434 //======= END OF TOOLTIP CONFIG, DO NOT CHANGE ANYTHING BELOW ==============//
3535
3636
Index: trunk/extensions/WikiTrust/js/tip_followscroll.js
@@ -28,7 +28,7 @@
2929 // created.
3030
3131 //=================== GLOBAL TOOLTIP CONFIGURATION ======================//
32 -config. FollowScroll = false // true or false - set to true if you want this to be the default behaviour
 32+config.FollowScroll = false; // true or false - set to true if you want this to be the default behaviour
3333 //======= END OF TOOLTIP CONFIG, DO NOT CHANGE ANYTHING BELOW ==============//
3434
3535
Index: trunk/extensions/DSMW/specials/SPFunctions.js
@@ -19,7 +19,7 @@
2020 //alert(xhr_object.responseText);
2121 eval(xhr_object.responseText);
2222 }
23 - }
 23+ };
2424
2525 xhr_object.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
2626 // --- ICI TU PASSE TES ARGUMENTS AU SCRIPT :
Index: trunk/extensions/SVGZoom/src/svg-uncompressed.js
@@ -1132,7 +1132,7 @@
11331133 // execution now
11341134 self._onDOMContentLoaded();
11351135 }
1136 - }
 1136+ };
11371137
11381138 // needed to intercept window.onload when page loaded first time
11391139 // (i.e. not in cache); see details above in script.onreadystatechange
@@ -3415,7 +3415,7 @@
34163416 svg = NativeHandler._patchAddEventListener(svg);
34173417
34183418 return svg;
3419 - }
 3419+ };
34203420
34213421 // Native browsers will fire the load event for SVG OBJECTs; we need to
34223422 // intercept event listeners for these so that they don't get fired in
@@ -3434,7 +3434,7 @@
34353435 } else {
34363436 throw 'Unknown createElement() call for SVG: ' + name;
34373437 }
3438 - }
 3438+ };
34393439
34403440 // cloneNode needs some help or it loses our reference to the patched
34413441 // addEventListener
@@ -3469,6 +3469,8 @@
34703470 }
34713471 }
34723472
 3473+};
 3474+
34733475 /** Adds a bit of magic we need on addEventListener so we can
34743476 fire SVGLoad events for dynamically created SVG nodes and load events
34753477 for SVG OBJECTS. Unfortunately Firefox has a frustrating bug where we
@@ -3788,10 +3790,10 @@
37893791 t = SVGPoint.prototype;
37903792 }
37913793
3792 - t.setX = function(newValue) { return this.x = newValue; }
3793 - t.getX = function() { return this.x; }
3794 - t.setY = function(newValue) { return this.y = newValue; }
3795 - t.getY = function() { return this.y; }
 3794+ t.setX = function(newValue) { return this.x = newValue; };
 3795+ t.getX = function() { return this.x; };
 3796+ t.setY = function(newValue) { return this.y = newValue; };
 3797+ t.getY = function() { return this.y; };
37963798 // custom extension in SVG Web to aid performance for Flash renderer
37973799 t.setXY = function(newValue1, newValue2) {
37983800 this.x = newValue1;
@@ -8568,12 +8570,12 @@
85698571 function createNodeList() {
85708572 var results = [];
85718573 results.item = function(i) {
8572 - if (i >= this.length) {
8573 - return null; // DOM Level 2 spec says return null
8574 - } else {
8575 - return this[i];
8576 - }
8577 - }
 8574+ if (i >= this.length) {
 8575+ return null; // DOM Level 2 spec says return null
 8576+ } else {
 8577+ return this[i];
 8578+ }
 8579+ };
85788580
85798581 return results;
85808582 }
Index: trunk/extensions/ImageTagging/img_tagging.js
@@ -194,7 +194,7 @@
195195
196196 taggingBusy = false;
197197 }
198 - }
 198+ };
199199 request.send(null);
200200
201201 var removeTagMsg = gid(kMessageRemovingTag).getAttribute("value");
@@ -329,7 +329,7 @@
330330 while (obj.offsetParent)
331331 {
332332 curleft += obj.offsetLeft;
333 - curtop += obj.offsetTop
 333+ curtop += obj.offsetTop;
334334 obj = obj.offsetParent;
335335 }
336336 }
Index: trunk/extensions/skins/Schulenburg/main.js
@@ -26,7 +26,7 @@
2727 } else {
2828 storyBox.innerHTML = httpRequest.responseText;
2929 }
30 - }
 30+ };
3131 httpRequest.open( 'GET', url, true );
3232 httpRequest.send(null);
3333 }
Index: trunk/extensions/skins/Tomas/main.js
@@ -26,7 +26,7 @@
2727 } else {
2828 storyBox.innerHTML = httpRequest.responseText;
2929 }
30 - }
 30+ };
3131 httpRequest.open( 'GET', url, true );
3232 httpRequest.send(null);
3333 }
Index: trunk/extensions/skins/Donate/main.js
@@ -26,7 +26,7 @@
2727 } else {
2828 storyBox.innerHTML = httpRequest.responseText;
2929 }
30 - }
 30+ };
3131 httpRequest.open( 'GET', url, true );
3232 httpRequest.send(null);
3333 }
Index: trunk/extensions/HeaderTabs/skins/headertabs.js
@@ -116,4 +116,4 @@
117117 }
118118
119119 return false;
120 -}
 120+};
Index: trunk/extensions/SVGEdit/modules/ext.svgedit.formmultipart.js
@@ -80,4 +80,4 @@
8181 // note: charset is needed in Safari 5 to workaround a webkit
8282 // oddity where it otherwise tries to add it after the boundary.
8383 return 'multipart/form-data; charset=utf-8; boundary=' + this.boundary;
84 -}
 84+};
Index: trunk/extensions/SVGEdit/modules/ext.svgedit.embedapi.js
@@ -72,7 +72,7 @@
7373 //Newer, well, it extracts things that aren't documented as well. All functions accessible through the normal thingy can now be accessed though the API
7474 //var l=[];for(var i in svgCanvas){if(typeof svgCanvas[i] == "function"){l.push(i)}};
7575 //run in svgedit itself
76 - var functions = ["updateElementFromJson", "embedImage", "fixOperaXML", "clearSelection", "addToSelection", "removeFromSelection", "addNodeToSelection", "open", "save", "getSvgString", "setSvgString", "createLayer", "deleteCurrentLayer", "getNumLayers", "getLayer", "getCurrentLayer", "setCurrentLayer", "renameCurrentLayer", "setCurrentLayerPosition", "getLayerVisibility", "setLayerVisibility", "moveSelectedToLayer", "getLayerOpacity", "setLayerOpacity", "clear", "clearPath", "getNodePoint", "clonePathNode", "deletePathNode", "getResolution", "getImageTitle", "setImageTitle", "setResolution", "setBBoxZoom", "setZoom", "getMode", "setMode", "getStrokeColor", "setStrokeColor", "getFillColor", "setFillColor", "setStrokePaint", "setFillPaint", "getStrokeWidth", "setStrokeWidth", "getStrokeStyle", "setStrokeStyle", "getOpacity", "setOpacity", "getFillOpacity", "setFillOpacity", "getStrokeOpacity", "setStrokeOpacity", "getTransformList", "getBBox", "getRotationAngle", "setRotationAngle", "each", "bind", "setIdPrefix", "getBold", "setBold", "getItalic", "setItalic", "getFontFamily", "setFontFamily", "getFontSize", "setFontSize", "getText", "setTextContent", "setImageURL", "setRectRadius", "setSegType", "quickClone", "beginUndoableChange", "changeSelectedAttributeNoUndo", "finishUndoableChange", "changeSelectedAttribute", "deleteSelectedElements", "groupSelectedElements", "ungroupSelectedElement", "moveToTopSelectedElement", "moveToBottomSelectedElement", "moveSelectedElements", "getStrokedBBox", "getVisibleElements", "cycleElement", "getUndoStackSize", "getRedoStackSize", "getNextUndoCommandText", "getNextRedoCommandText", "undo", "redo", "cloneSelectedElements", "alignSelectedElements", "getZoom", "getVersion", "setIconSize", "setLang", "setCustomHandlers"]
 76+ var functions = ["updateElementFromJson", "embedImage", "fixOperaXML", "clearSelection", "addToSelection", "removeFromSelection", "addNodeToSelection", "open", "save", "getSvgString", "setSvgString", "createLayer", "deleteCurrentLayer", "getNumLayers", "getLayer", "getCurrentLayer", "setCurrentLayer", "renameCurrentLayer", "setCurrentLayerPosition", "getLayerVisibility", "setLayerVisibility", "moveSelectedToLayer", "getLayerOpacity", "setLayerOpacity", "clear", "clearPath", "getNodePoint", "clonePathNode", "deletePathNode", "getResolution", "getImageTitle", "setImageTitle", "setResolution", "setBBoxZoom", "setZoom", "getMode", "setMode", "getStrokeColor", "setStrokeColor", "getFillColor", "setFillColor", "setStrokePaint", "setFillPaint", "getStrokeWidth", "setStrokeWidth", "getStrokeStyle", "setStrokeStyle", "getOpacity", "setOpacity", "getFillOpacity", "setFillOpacity", "getStrokeOpacity", "setStrokeOpacity", "getTransformList", "getBBox", "getRotationAngle", "setRotationAngle", "each", "bind", "setIdPrefix", "getBold", "setBold", "getItalic", "setItalic", "getFontFamily", "setFontFamily", "getFontSize", "setFontSize", "getText", "setTextContent", "setImageURL", "setRectRadius", "setSegType", "quickClone", "beginUndoableChange", "changeSelectedAttributeNoUndo", "finishUndoableChange", "changeSelectedAttribute", "deleteSelectedElements", "groupSelectedElements", "ungroupSelectedElement", "moveToTopSelectedElement", "moveToBottomSelectedElement", "moveSelectedElements", "getStrokedBBox", "getVisibleElements", "cycleElement", "getUndoStackSize", "getRedoStackSize", "getNextUndoCommandText", "getNextRedoCommandText", "undo", "redo", "cloneSelectedElements", "alignSelectedElements", "getZoom", "getVersion", "setIconSize", "setLang", "setCustomHandlers"];
7777
7878 //TODO: rewrite the following, it's pretty scary.
7979 for(var i = 0; i < functions.length; i++){
@@ -82,7 +82,7 @@
8383 for(var g = 0, args = []; g < arguments.length; g++){
8484 args.push(arguments[g]);
8585 }
86 - var cbid = t.send(d,args, function(){}) //the callback (currently it's nothing, but will be set later
 86+ var cbid = t.send(d,args, function(){}); //the callback (currently it's nothing, but will be set later
8787
8888 return function(newcallback){
8989 t.callbacks[cbid] = newcallback; //set callback
@@ -136,7 +136,7 @@
137137 }
138138 return "{"+pairs.join(",")+"}" //wrap in the braces
139139 }
140 -}
 140+};
141141
142142 embedded_svg_edit.prototype.send = function(name, args, callback){
143143 var cbid = Math.floor(Math.random()*31776352877+993577).toString();
@@ -151,7 +151,7 @@
152152 }, 0);
153153 return cbid;
154154 //this.stack.shift()("svgCanvas['"+name+"']("+argstr.join(",")+")")
155 -}
 155+};
156156
157157
158158

Status & tagging log