/*jshint camelcase:false */ ( function ( mw, $ ) { var licenseSelectorCheck, wgUploadWarningObj, wgUploadLicenseObj, fillDestFilename, ajaxUploadDestCheck = mw.config.get( 'wgAjaxUploadDestCheck' ), fileExtensions = mw.config.get( 'wgFileExtensions' ), $spinnerDestCheck, $spinnerLicense; licenseSelectorCheck = window.licenseSelectorCheck = function () { var selector = document.getElementById( 'wpLicense' ), selection = selector.options[selector.selectedIndex].value; if ( selector.selectedIndex > 0 ) { if ( !selection ) { // Option disabled, but browser is broken and doesn't respect this selector.selectedIndex = 0; } } // We might show a preview wgUploadLicenseObj.fetchPreview( selection ); }; function uploadSetup() { // Disable URL box if the URL copy upload source type is not selected var ein, selector, ua, isMacIe, i, optionsTable, row, td, wpLicense, wpLicenseRow, wpLicenseTbody, uploadSourceIds, len, onchange, e = document.getElementById( 'wpSourceTypeurl' ); if ( e ) { if ( !e.checked ) { ein = document.getElementById( 'wpUploadFileURL' ); if ( ein ) { ein.disabled = true; } } } // For MSIE/Mac: non-breaking spaces cause the