From: Sam Reed Date: Mon, 6 Dec 2010 22:29:41 +0000 (+0000) Subject: (bug 26265) Many semicolons are missing from JavaScript files X-Git-Tag: 1.31.0-rc.0~33503 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/journal.php?a=commitdiff_plain;h=1519cfebb540dffae9d8039120a7abd4a5f87e86;p=lhc%2Fweb%2Fwiklou.git (bug 26265) Many semicolons are missing from JavaScript files Unterminated statements.. --- diff --git a/skins/common/IEFixes.js b/skins/common/IEFixes.js index 0d3fd26e41..ba4dc66b64 100644 --- a/skins/common/IEFixes.js +++ b/skins/common/IEFixes.js @@ -10,7 +10,7 @@ window.hookit = function() { relativeforfloats(); fixalpha(); } -} +}; if ( document.attachEvent ) { document.attachEvent( 'onreadystatechange', window.hookit ); @@ -61,7 +61,7 @@ window.fixalpha = function( logoId ) { linkFix.style.width = '100%'; } } -} +}; // fix ie6 disappering float bug window.relativeforfloats = function() { @@ -72,7 +72,8 @@ window.relativeforfloats = function() { } setrelative( tables ); setrelative( divs ); -} +}; + window.setrelative = function( nodes ) { var i = 0; while ( i < nodes.length ) { @@ -84,7 +85,7 @@ window.setrelative = function( nodes ) { } i++; } -} +}; // Expand links for printing String.prototype.hasClass = function( classWanted ) { @@ -95,7 +96,7 @@ String.prototype.hasClass = function( classWanted ) { } } return false; -} +}; window.expandedURLs = undefined; @@ -117,7 +118,7 @@ window.onbeforeprint = function() { } } } -} +}; window.onafterprint = function() { for ( var i = 0; i < expandedURLs.length; i++ ) { @@ -125,4 +126,4 @@ window.onafterprint = function() { expandedURLs[i].removeNode( true ); } } -} +}; diff --git a/skins/common/ajax.js b/skins/common/ajax.js index 06d4f4e020..1cad75edc7 100644 --- a/skins/common/ajax.js +++ b/skins/common/ajax.js @@ -156,7 +156,7 @@ window.sajax_do_call = function(func_name, args, target) { } return; - } + }; sajax_debug( func_name + ' uri = ' + uri + ' / post = ' + post_data ); x.send( post_data ); diff --git a/skins/common/block.js b/skins/common/block.js index 425733b9a6..355440c81d 100644 --- a/skins/common/block.js +++ b/skins/common/block.js @@ -16,7 +16,7 @@ window.considerChangingExpiryFocus = function() { } else { field.style.display = 'none'; } -} +}; window.updateBlockOptions = function() { if ( !document.getElementById ) { return; @@ -59,6 +59,6 @@ window.updateBlockOptions = function() { if( watchuserRow ) { watchuserRow.style.display = isIpRange && !isEmpty ? 'none' : ''; } -} +}; addOnloadHook( considerChangingExpiryFocus ); \ No newline at end of file diff --git a/skins/common/changepassword.js b/skins/common/changepassword.js index f1b4b3e3b8..7b777c916c 100644 --- a/skins/common/changepassword.js +++ b/skins/common/changepassword.js @@ -7,10 +7,10 @@ window.onNameChange = function() { document.getElementById('wpPassword').disabled = false; document.getElementById('wpComment').disabled = true; } -} +}; window.onNameChangeHook = function() { document.getElementById( 'wpName' ).onblur = onNameChange; -} +}; addOnloadHook( onNameChangeHook ); diff --git a/skins/common/edit.js b/skins/common/edit.js index f752454a68..fe5435014c 100644 --- a/skins/common/edit.js +++ b/skins/common/edit.js @@ -12,7 +12,7 @@ window.addButton = function( imageFile, speedTip, tagOpen, tagClose, sampleText, 'tagClose': tagClose, 'sampleText': sampleText }); -} +}; // this function adds one toolbar button from a mwEditButtons/mwCustomEditButtons item window.mwInsertEditButton = function( parent, item ) { @@ -39,7 +39,7 @@ window.mwInsertEditButton = function( parent, item ) { parent.appendChild( image ); return true; -} +}; // this function generates the actual toolbar buttons with localized text // we use it to avoid creating the toolbar where javascript is not enabled @@ -73,7 +73,7 @@ window.mwSetupToolbar = function() { mwInsertEditButton( toolbar, mwCustomEditButtons[i] ); } return true; -} +}; // apply tagOpen/tagClose to selection in textarea, // use sampleText instead of selection if there is none @@ -160,7 +160,7 @@ window.insertTags = function( tagOpen, tagClose, sampleText ) { } } -} +}; /** * Restore the edit box scroll state following a preview operation, @@ -178,7 +178,7 @@ window.scrollEditBox = function() { scrollTop.value = editBox.scrollTop; } ); } -} +}; hookEvent( 'load', scrollEditBox ); hookEvent( 'load', mwSetupToolbar ); hookEvent( 'load', function() { @@ -262,7 +262,7 @@ addOnloadHook(function () { e.returnValue = false; //IE return false; } - } + }; addHandler(summary, 'keypress', checkSummary); }); diff --git a/skins/common/enhancedchanges.js b/skins/common/enhancedchanges.js index d583cdf0b6..bcc2cc88a6 100644 --- a/skins/common/enhancedchanges.js +++ b/skins/common/enhancedchanges.js @@ -37,4 +37,4 @@ window.toggleVisibility = function(idNumber) { closearrow.className = 'mw-changeslist-hidden'; subentries.className = 'mw-changeslist-hidden'; } -} +}; diff --git a/skins/common/history.js b/skins/common/history.js index 9da0a75118..33845a7587 100644 --- a/skins/common/history.js +++ b/skins/common/history.js @@ -7,7 +7,7 @@ window.historyRadios = function(parent) { } } return radios; -} +}; // check selection and tweak visibility/class onclick window.diffcheck = function() { @@ -74,4 +74,4 @@ window.diffcheck = function() { } } return true; -} +}; diff --git a/skins/common/htmlform.js b/skins/common/htmlform.js index 075ae3209b..900b16603e 100644 --- a/skins/common/htmlform.js +++ b/skins/common/htmlform.js @@ -36,5 +36,5 @@ window.htmlforms = { textbox.disabled = true; } } -} +}; diff --git a/skins/common/metadata.js b/skins/common/metadata.js index 78bf41d69f..8fafc95581 100644 --- a/skins/common/metadata.js +++ b/skins/common/metadata.js @@ -46,7 +46,7 @@ window.attachMetadataToggle = function( tableId, showText, hideText ) { return true; } return false; -} +}; $( document ).ready( function() { attachMetadataToggle( 'mw_metadata', mediaWiki.msg( 'metadata-expand' ), mediaWiki.msg( 'metadata-collapse' ) ); diff --git a/skins/common/mwsuggest.js b/skins/common/mwsuggest.js index 905758df40..520a1a8989 100644 --- a/skins/common/mwsuggest.js +++ b/skins/common/mwsuggest.js @@ -57,7 +57,7 @@ window.os_Timer = function( id, r, query ) { this.id = id; this.r = r; this.query = query; -} +}; /** Property class for single search box */ window.os_Results = function( name, formname ) { @@ -77,7 +77,7 @@ window.os_Results = function( name, formname ) { this.containerTotal = 0; // total height of the container will all results this.visible = false; // if container is visible this.stayHidden = false; // don't try to show if lost focus -} +}; /** Timer user to animate expansion/contraction of container width */ window.os_AnimationTimer = function( r, target ) { @@ -91,7 +91,7 @@ window.os_AnimationTimer = function( r, target ) { this.inc = -os_animation_min_step; } this.target = target; -} +}; /****************** * Initialization @@ -107,7 +107,7 @@ window.os_MWSuggestInit = function() { os_initHandlers( id, form, element ); } } -} +}; /** Init Result objects and event handlers */ window.os_initHandlers = function( name, formname, element ) { @@ -157,7 +157,7 @@ window.os_initHandlers = function( name, formname, element ) { } */ } -} +}; window.os_hookEvent = function( element, hookName, hookFunct ) { if ( element.addEventListener ) { @@ -165,7 +165,7 @@ window.os_hookEvent = function( element, hookName, hookFunct ) { } else if ( window.attachEvent ) { element.attachEvent( 'on' + hookName, hookFunct ); } -} +}; /******************** * Keyboard events @@ -185,7 +185,7 @@ window.os_eventKeyup = function( e ) { } var query = targ.value; os_fetchResults( r, query, os_search_timeout ); -} +}; /** catch arrows up/down and escape to hide the suggestions */ window.os_processKey = function( r, keypressed, targ ) { @@ -215,7 +215,7 @@ window.os_processKey = function( r, keypressed, targ ) { } else if( r.query != document.getElementById( r.searchbox ).value ) { // os_hideResults( r ); // don't show old suggestions } -} +}; /** When keys is held down use a timer to output regular events */ window.os_eventKeypress = function( e ) { @@ -229,7 +229,7 @@ window.os_eventKeypress = function( e ) { os_keypressed_count++; os_processKey( r, keypressed, targ ); -} +}; /** Catch the key code (Firefox bug) */ window.os_eventKeydown = function( e ) { @@ -246,7 +246,7 @@ window.os_eventKeydown = function( e ) { os_cur_keypressed = ( e.keyCode == undefined ) ? e.which : e.keyCode; os_keypressed_count = 0; -} +}; /** When the form is submitted hide everything, cancel updates... */ @@ -272,7 +272,7 @@ window.os_eventOnsubmit = function( e ) { } } return true; -} +}; @@ -289,7 +289,7 @@ window.os_hideResults = function( r ) { } r.visible = false; r.selected = -1; -} +}; window.os_decodeValue = function( value ) { if ( decodeURIComponent ) { @@ -299,7 +299,7 @@ window.os_decodeValue = function( value ) { return unescape( value ); } return null; -} +}; window.os_encodeQuery = function( value ) { if ( encodeURIComponent ) { @@ -309,7 +309,7 @@ window.os_encodeQuery = function( value ) { return escape( value ); } return null; -} +}; /** Handles data from XMLHttpRequest, and updates the suggest results */ window.os_updateResults = function( r, query, text, cacheKey ) { @@ -340,7 +340,7 @@ window.os_updateResults = function( r, query, text, cacheKey ) { os_cache[cacheKey] = null; } } -} +}; /** * Create and populate a . @@ -370,7 +370,7 @@ window.os_setupDatalist = function( r, results ) { r.results[i] = title; c.appendChild( opt ); } -} +}; /** Fetch namespaces from checkboxes or hidden fields in the search form, if none defined use wgSearchNamespaces global */ @@ -395,7 +395,7 @@ window.os_getNamespaces = function( r ) { namespaces = wgSearchNamespaces.join('|'); } return namespaces; -} +}; /** Update results if user hasn't already typed something else */ window.os_updateIfRelevant = function( r, query, text, cacheKey ) { @@ -404,7 +404,7 @@ window.os_updateIfRelevant = function( r, query, text, cacheKey ) { os_updateResults( r, query, text, cacheKey ); } r.query = query; -} +}; /** Fetch results after some timeout */ window.os_delayedFetch = function() { @@ -441,7 +441,7 @@ window.os_delayedFetch = function() { } } } -} +}; /** Init timed update via os_delayedUpdate() */ window.os_fetchResults = function( r, query, timeout ) { @@ -466,7 +466,7 @@ window.os_fetchResults = function( r, query, timeout ) { os_timer = new os_Timer( null, r, query ); os_delayedFetch(); // do it now! } -} +}; /** Find event target */ window.os_getTarget = function( e ) { @@ -480,7 +480,7 @@ window.os_getTarget = function( e ) { } else { return null; } -} +}; /** Check if x is a valid integer */ window.os_isNumber = function( x ) { @@ -494,12 +494,12 @@ window.os_isNumber = function( x ) { } } return true; -} +}; /** Call this to enable suggestions on input (id=inputId), on a form (name=formName) */ window.os_enableSuggestionsOn = function( inputId, formName ) { os_initHandlers( inputId, formName, document.getElementById( inputId ) ); -} +}; /** Call this to disable suggestios on input box (id=inputId) */ window.os_disableSuggestionsOn = function( inputId ) { @@ -519,7 +519,7 @@ window.os_disableSuggestionsOn = function( inputId ) { if ( index >= 0 ) { os_autoload_inputs[index] = os_autoload_forms[index] = ''; } -} +}; /************************************************ * Div-only functions (irrelevant for datalist) @@ -542,7 +542,7 @@ window.os_eventBlur = function( e ) { } os_timer = null; } -} +}; /** Event: focus (catch only when stopped) */ window.os_eventFocus = function( e ) { @@ -552,7 +552,7 @@ window.os_eventFocus = function( e ) { return; // not our event } r.stayHidden = false; -} +}; /** * Create and populate a
, for non--supporting browsers. @@ -573,7 +573,7 @@ window.os_setupDiv = function( r, results ) { os_fitContainer( r ); os_trimResultText( r ); os_showResults( r ); -} +}; /** Create the result table to be placed in the container div */ window.os_createResultTable = function( r, results ) { @@ -589,7 +589,7 @@ window.os_createResultTable = function( r, results ) { } html += ''; return html; -} +}; /** Show results div */ window.os_showResults = function( r ) { @@ -607,7 +607,7 @@ window.os_showResults = function( r ) { c.style.visibility = 'visible'; r.visible = true; } -} +}; window.os_operaWidthFix = function( x ) { // For browsers that don't understand overflow-x, estimate scrollbar width @@ -615,7 +615,7 @@ window.os_operaWidthFix = function( x ) { return 30; } return 0; -} +}; /** Brower-dependent functions to find window inner size, and scroll status */ window.f_clientWidth = function() { @@ -624,7 +624,7 @@ window.f_clientWidth = function() { document.documentElement ? document.documentElement.clientWidth : 0, document.body ? document.body.clientWidth : 0 ); -} +}; window.f_clientHeight = function() { return f_filterResults( @@ -632,7 +632,7 @@ window.f_clientHeight = function() { document.documentElement ? document.documentElement.clientHeight : 0, document.body ? document.body.clientHeight : 0 ); -} +}; window.f_scrollLeft = function() { return f_filterResults( @@ -640,7 +640,7 @@ window.f_scrollLeft = function() { document.documentElement ? document.documentElement.scrollLeft : 0, document.body ? document.body.scrollLeft : 0 ); -} +}; window.f_scrollTop = function() { return f_filterResults( @@ -648,7 +648,7 @@ window.f_scrollTop = function() { document.documentElement ? document.documentElement.scrollTop : 0, document.body ? document.body.scrollTop : 0 ); -} +}; window.f_filterResults = function( n_win, n_docel, n_body ) { var n_result = n_win ? n_win : 0; @@ -656,7 +656,7 @@ window.f_filterResults = function( n_win, n_docel, n_body ) { n_result = n_docel; } return n_body && ( !n_result || ( n_result > n_body ) ) ? n_body : n_result; -} +}; /** Get the height available for the results container */ window.os_availableHeight = function( r ) { @@ -666,7 +666,7 @@ window.os_availableHeight = function( r ) { absTop = absTop.substring( 0, px ); } return f_clientHeight() - ( absTop - f_scrollTop() ); -} +}; /** Get element absolute position {left,top} */ window.os_getElementPosition = function( elemID ) { @@ -683,33 +683,41 @@ window.os_getElementPosition = function( elemID ) { offsetTop += document.body.topMargin; } return { left:offsetLeft, top:offsetTop }; -} +}; /** Create the container div that will hold the suggested titles */ -window.os_createContainer = function( r ) { - var c = document.createElement( 'div' ); - var s = document.getElementById( r.searchbox ); - var pos = os_getElementPosition( r.searchbox ); +window.os_createContainer = function(r) { + var c = document.createElement('div'); + var s = document.getElementById(r.searchbox); + var pos = os_getElementPosition(r.searchbox); var left = pos.left; var top = pos.top + s.offsetHeight; c.className = 'os-suggest'; - c.setAttribute( 'id', r.container ); - document.body.appendChild( c ); + c.setAttribute('id', r.container); + document.body.appendChild(c); // dynamically generated style params // IE workaround, cannot explicitely set "style" attribute - c = document.getElementById( r.container ); + c = document.getElementById(r.container); c.style.top = top + 'px'; c.style.left = left + 'px'; c.style.width = s.offsetWidth + 'px'; // mouse event handlers - c.onmouseover = function( event ) { os_eventMouseover( r.searchbox, event ); }; - c.onmousemove = function( event ) { os_eventMousemove( r.searchbox, event ); }; - c.onmousedown = function( event ) { return os_eventMousedown( r.searchbox, event ); }; - c.onmouseup = function( event ) { os_eventMouseup( r.searchbox, event ); }; + c.onmouseover = function(event) { + os_eventMouseover(r.searchbox, event); + }; + c.onmousemove = function(event) { + os_eventMousemove(r.searchbox, event); + }; + c.onmousedown = function(event) { + return os_eventMousedown(r.searchbox, event); + }; + c.onmouseup = function(event) { + os_eventMouseup(r.searchbox, event); + }; return c; -} +}; /** change container height to fit to screen */ window.os_fitContainer = function( r ) { @@ -730,7 +738,7 @@ window.os_fitContainer = function( r ) { c.style.height = r.containerTotal + 'px'; r.containerCount = r.resultCount; } -} +}; /** If some entries are longer than the box, replace text with "..." */ window.os_trimResultText = function( r ) { @@ -796,7 +804,7 @@ window.os_trimResultText = function( r ) { document.getElementById( r.resultTable + i ).setAttribute( 'title', r.results[i] ); } } -} +}; /** Invoked on timer to animate change in container width */ window.os_animateChangeWidth = function() { @@ -820,7 +828,7 @@ window.os_animateChangeWidth = function() { c.style.left = ( normL + normW + ( target - nw ) - os_animation_timer.target - 1 ) + 'px'; } } -} +}; /** Change the highlighted row (i.e. suggestion), from position cur to next */ window.os_changeHighlight = function( r, cur, next, updateSearchBox ) { @@ -868,7 +876,7 @@ window.os_changeHighlight = function( r, cur, next, updateSearchBox ) { if( updateSearchBox ) { os_updateSearchQuery( r, newText ); } -} +}; window.os_HighlightClass = function() { var match = navigator.userAgent.match(/AppleWebKit\/(\d+)/); @@ -882,12 +890,12 @@ window.os_HighlightClass = function() { } } return 'os-suggest-result-hl'; -} +}; window.os_updateSearchQuery = function( r, newText ) { document.getElementById( r.searchbox ).value = newText; r.query = newText; -} +}; /******************** @@ -905,7 +913,7 @@ window.os_eventMouseover = function( srcId, e ) { if( num >= 0 ) { os_changeHighlight( r, r.selected, num, false ); } -} +}; /* Get row where the event occured (from its id) */ window.os_getNumberSuffix = function( id ) { @@ -918,12 +926,12 @@ window.os_getNumberSuffix = function( id ) { } else { return -1; } -} +}; /** Save mouse move as last action */ window.os_eventMousemove = function( srcId, e ) { os_mouse_moved = true; -} +}; /** Mouse button held down, register possible click */ window.os_eventMousedown = function( srcId, e ) { @@ -943,7 +951,7 @@ window.os_eventMousedown = function( srcId, e ) { document.getElementById( r.searchbox ).focus(); return false; // prevents selection -} +}; /** Mouse button released, check for click on some row */ window.os_eventMouseup = function( srcId, e ) { @@ -962,7 +970,7 @@ window.os_eventMouseup = function( srcId, e ) { os_mouse_pressed = false; // keep the focus on the search field document.getElementById( r.searchbox ).focus(); -} +}; /** Toggle stuff seems to be dead code? */ @@ -978,7 +986,7 @@ window.os_createToggle = function( r, className ) { link.appendChild( msg ); t.appendChild( link ); return t; -} +}; /** Call when user clicks on some of the toggle links */ window.os_toggle = function( inputId, formName ) { @@ -995,6 +1003,6 @@ window.os_toggle = function( inputId, formName ) { // change message var link = document.getElementById( r.toggle ).firstChild; link.replaceChild( document.createTextNode( msg ), link.firstChild ); -} +}; hookEvent( 'load', os_MWSuggestInit ); diff --git a/skins/common/password.js b/skins/common/password.js index b002ae3f11..3455da37ba 100644 --- a/skins/common/password.js +++ b/skins/common/password.js @@ -36,7 +36,7 @@ window.bruteForceComplexity = function( pwd ) { score += ( charClasses - 1 ) * 10; return score; -} +}; // Calculates a penalty to brute force score due to character repetition window.repetitionAdjustment = function( pwd ) { @@ -49,7 +49,7 @@ window.repetitionAdjustment = function( pwd ) { var ratio = pwd.length / unique.length - 0.4; // allow up to 40% repetition, reward for less, penalize for more return ratio * 10; -} +}; // Checks how many simple sequences ("abc", "321") are there in the password window.sequenceScore = function( pwd ) { @@ -76,7 +76,7 @@ window.sequenceScore = function( pwd ) { } } return score; -} +}; (function( $ ) { function passwordChanged() { diff --git a/skins/common/prefs.js b/skins/common/prefs.js index 5de9bae806..c63af3de7a 100644 --- a/skins/common/prefs.js +++ b/skins/common/prefs.js @@ -11,7 +11,7 @@ window.checkTimezone = function( tz, msg ) { var junk = msg.split('$1'); document.write( junk[0] + 'UTC' + tzString + junk[1] ); } -} +}; window.timezoneSetup = function() { var tzSelect = document.getElementById( 'mw-input-timecorrection' ); @@ -23,7 +23,7 @@ window.timezoneSetup = function() { } updateTimezoneSelection( false ); -} +}; // in [-]HH:MM format... // won't yet work with non-even tzs @@ -37,7 +37,7 @@ window.fetchTimezone = function() { var tzString = ( ( tzRaw >= 0 ) ? '-' : '' ) + ( ( tzHour < 10 ) ? '0' : '' ) + tzHour + ':' + ( ( tzMin < 10 ) ? '0' : '' ) + tzMin; return tzString; -} +}; window.guessTimezone = function() { var textbox = document.getElementById( 'mw-input-timecorrection-other' ); @@ -47,7 +47,7 @@ window.guessTimezone = function() { textbox.value = fetchTimezone(); textbox.disabled = false; // The changed handler doesn't trip, obviously. updateTimezoneSelection( true ); -} +}; window.updateTimezoneSelection = function( force_offset ) { var selector = document.getElementById( 'mw-input-timecorrection' ); @@ -133,6 +133,6 @@ window.updateTimezoneSelection = function( force_offset ) { } textbox.value = hour + ':' + min; } -} +}; addOnloadHook( timezoneSetup ); diff --git a/skins/common/preview.js b/skins/common/preview.js index 62b27e48b9..f559994dcb 100644 --- a/skins/common/preview.js +++ b/skins/common/preview.js @@ -50,7 +50,7 @@ window.doLivePreview = function( e ) { $( mw ).trigger( 'LivePreviewDone', [copyElements] ); } ); -} +}; // Shamelessly stolen from the jQuery form plugin, which is licensed under the GPL. // http://jquery.malsup.com/form/#download diff --git a/skins/common/protect.js b/skins/common/protect.js index 58df6aac34..a284c3f8af 100644 --- a/skins/common/protect.js +++ b/skins/common/protect.js @@ -20,7 +20,7 @@ window.ProtectionForm = { if( !box ) return false; - var boxbody = box.getElementsByTagName('tbody')[0] + var boxbody = box.getElementsByTagName('tbody')[0]; var row = document.createElement( 'tr' ); boxbody.insertBefore( row, boxbody.firstChild.nextSibling ); @@ -348,4 +348,4 @@ window.ProtectionForm = { } }); } -} +}; diff --git a/skins/common/search.js b/skins/common/search.js index 370d889935..26d807db1f 100644 --- a/skins/common/search.js +++ b/skins/common/search.js @@ -20,7 +20,7 @@ window.mwSearchHeaderClick = function( obj ) { prefix = '&search='; } obj.href = parts[0] + prefix + encodeURIComponent( searchterm ) + lastpart; -} +}; window.mwToggleSearchCheckboxes = function( btn ) { if( !document.getElementById ) { @@ -47,4 +47,4 @@ window.mwToggleSearchCheckboxes = function( btn ) { } } } -} +}; diff --git a/skins/common/upload.js b/skins/common/upload.js index 105b8e69d7..962e5c4234 100644 --- a/skins/common/upload.js +++ b/skins/common/upload.js @@ -9,7 +9,7 @@ window.licenseSelectorCheck = function() { } // We might show a preview wgUploadLicenseObj.fetchPreview( selection ); -} +}; window.wgUploadSetup = function() { // Disable URL box if the URL copy upload source type is not selected @@ -84,7 +84,7 @@ window.wgUploadSetup = function() { document.getElementById( wgUploadSourceIds[i] ).onchange = function (e) { fillDestFilename( this.id ); }; -} +}; /** * Iterate over all upload source fields and disable all except the selected one. @@ -123,7 +123,7 @@ window.toggleUploadInputs = function() { inputs[j].disabled = !isChecked; } } -} +}; window.wgUploadWarningObj = { 'responseCache' : { '' : ' ' }, @@ -209,7 +209,7 @@ window.wgUploadWarningObj = { element.innerHTML = text; } } -} +}; window.fillDestFilename = function(id) { if (!wgUploadAutoFill) { @@ -263,7 +263,7 @@ window.fillDestFilename = function(id) { if( e ) e.className = 'error'; // Clear wpDestFile as well - var e = document.getElementById( 'wpDestFile' ) + var e = document.getElementById( 'wpDestFile' ); if( e ) e.value = ''; return false; @@ -283,7 +283,7 @@ window.fillDestFilename = function(id) { destFile.value = fname; wgUploadWarningObj.checkNow(fname) ; } -} +}; window.toggleFilenameFiller = function() { if(!document.getElementById) return; @@ -294,7 +294,7 @@ window.toggleFilenameFiller = function() { } else { wgUploadAutoFill = false; } -} +}; window.wgUploadLicenseObj = { @@ -340,6 +340,6 @@ window.wgUploadLicenseObj = { previewPanel.innerHTML = preview; } -} +}; addOnloadHook( wgUploadSetup ); diff --git a/skins/common/wikibits.js b/skins/common/wikibits.js index 6f27d8ac80..0a949ee62d 100644 --- a/skins/common/wikibits.js +++ b/skins/common/wikibits.js @@ -63,7 +63,7 @@ window.addOnloadHook = function( hookFunct ) { } else { hookFunct(); // bug in MSIE script loading } -} +}; window.importScript = function( page ) { // TODO: might want to introduce a utility function to match wfUrlencode() in PHP @@ -71,7 +71,7 @@ window.importScript = function( page ) { encodeURIComponent(page.replace(/ /g,'_')).replace(/%2F/ig,'/').replace(/%3A/ig,':') + '&action=raw&ctype=text/javascript'; return importScriptURI( uri ); -} +}; window.loadedScripts = {}; // included-scripts tracker window.importScriptURI = function( url ) { @@ -84,11 +84,11 @@ window.importScriptURI = function( url ) { s.setAttribute( 'type', 'text/javascript' ); document.getElementsByTagName('head')[0].appendChild( s ); return s; -} +}; window.importStylesheet = function( page ) { return importStylesheetURI( wgScript + '?action=raw&ctype=text/css&title=' + encodeURIComponent( page.replace(/ /g,'_') ) ); -} +}; window.importStylesheetURI = function( url, media ) { var l = document.createElement( 'link' ); @@ -100,7 +100,7 @@ window.importStylesheetURI = function( url, media ) { } document.getElementsByTagName('head')[0].appendChild( l ); return l; -} +}; window.appendCSS = function( text ) { var s = document.createElement( 'style' ); @@ -113,7 +113,7 @@ window.appendCSS = function( text ) { } document.getElementsByTagName('head')[0].appendChild( s ); return s; -} +}; // Special stylesheet links for Monobook only (see bug 14717) if ( typeof stylepath != 'undefined' && skin == 'monobook' ) { @@ -170,7 +170,7 @@ window.showTocToggle = function() { toggleToc(); } } -} +}; window.changeText = function( el, newText ) { // Safari work around @@ -179,7 +179,7 @@ window.changeText = function( el, newText ) { } else if ( el.firstChild && el.firstChild.nodeValue ) { el.firstChild.nodeValue = newText; } -} +}; window.killEvt = function( evt ) { evt = evt || window.event || window.Event; // W3C, IE, Netscape @@ -190,7 +190,7 @@ window.killEvt = function( evt ) { evt.cancelBubble = true; // IE } return false; // Don't follow the link (IE) -} +}; window.toggleToc = function() { var tocmain = document.getElementById( 'toc' ); @@ -209,7 +209,7 @@ window.toggleToc = function() { tocmain.className = 'toc tochidden'; } return false; -} +}; window.mwEditButtons = []; window.mwCustomEditButtons = []; // eg to add in MediaWiki:Common.js @@ -220,7 +220,7 @@ window.escapeQuotes = function( text ) { re = new RegExp( "\\n", "g" ); text = text.replace( re, "\\n" ); return escapeQuotesHTML( text ); -} +}; window.escapeQuotesHTML = function( text ) { var re = new RegExp( '&', "g" ); @@ -232,7 +232,7 @@ window.escapeQuotesHTML = function( text ) { re = new RegExp( '>', "g" ); text = text.replace( re, ">" ); return text; -} +}; /** * Set the accesskey prefix based on browser detection. @@ -291,7 +291,7 @@ window.updateTooltipAccessKeys = function( nodeList ) { element.setAttribute( 'title', tip ); } } -} +}; /** * Add a link to one of the portlet menus on the page, including: @@ -384,7 +384,7 @@ window.addPortletLink = function( portlet, href, text, id, tooltip, accesskey, n } return item; -} +}; window.getInnerText = function( el ) { if ( el.getAttribute( 'data-sort-value' ) !== null ) { @@ -418,12 +418,12 @@ window.getInnerText = function( el ) { } } return str; -} +}; /* Dummy for deprecated function */ window.ta = []; window.akeytt = function( doId ) { -} +}; window.checkboxes = undefined; window.lastCheckbox = undefined; @@ -433,7 +433,7 @@ window.setupCheckboxShiftClick = function() { lastCheckbox = null; var inputs = document.getElementsByTagName( 'input' ); addCheckboxClickHandlers( inputs ); -} +}; window.addCheckboxClickHandlers = function( inputs, start ) { if ( !start ) { @@ -461,7 +461,7 @@ window.addCheckboxClickHandlers = function( inputs, start ) { addCheckboxClickHandlers( inputs, finish ); }, 200 ); } -} +}; window.checkboxClickHandler = function( e ) { if ( typeof e == 'undefined' ) { @@ -488,7 +488,7 @@ window.checkboxClickHandler = function( e ) { } lastCheckbox = this.index; return true; -} +}; /* @@ -539,7 +539,7 @@ window.getElementsByClassName = function( oElm, strTagName, oClassNames ) { } } return ( arrReturnElements ); -} +}; window.redirectToFragment = function( fragment ) { var match = navigator.userAgent.match(/AppleWebKit\/(\d+)/); @@ -568,7 +568,7 @@ window.redirectToFragment = function( fragment ) { }); } } -} +}; /* * Table sorting script based on one (c) 1997-2006 Stuart Langridge and Joost @@ -601,7 +601,7 @@ window.sortables_init = function() { } ts_makeSortable( tables[ti] ); } -} +}; window.ts_makeSortable = function( table ) { var firstRow; @@ -632,11 +632,11 @@ window.ts_makeSortable = function( table ) { if ( ts_alternate_row_colors ) { ts_alternate( table ); } -} +}; window.ts_getInnerText = function( el ) { return getInnerText( el ); -} +}; window.ts_resortTable = function( lnk ) { // get the span