mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ConfirmEdit
synced 2024-11-23 15:56:50 +00:00
Merge "build: Updating npm dependencies"
This commit is contained in:
commit
47dffc154b
|
@ -7,7 +7,7 @@ $( document ).on( 'click', '.fancycaptcha-reload', function () {
|
|||
$this.addClass( 'fancycaptcha-reload-loading' );
|
||||
|
||||
// AJAX request to get captcha index key
|
||||
new mw.Api().post( { action: 'fancycaptchareload' } ).done( function ( data ) {
|
||||
new mw.Api().post( { action: 'fancycaptchareload' } ).done( ( data ) => {
|
||||
const captchaIndex = data.fancycaptchareload.index;
|
||||
let imgSrc;
|
||||
if ( typeof captchaIndex === 'string' ) {
|
||||
|
@ -27,7 +27,7 @@ $( document ).on( 'click', '.fancycaptcha-reload', function () {
|
|||
$captchaImage.data( 'captchaId', captchaIndex );
|
||||
}
|
||||
} )
|
||||
.always( function () {
|
||||
.always( () => {
|
||||
$this.removeClass( 'fancycaptcha-reload-loading' );
|
||||
} );
|
||||
|
||||
|
|
|
@ -10,9 +10,7 @@ module.exports = function ( grunt ) {
|
|||
// eslint-disable-next-line security/detect-non-literal-require
|
||||
messagesDirs[ subExtension ] = require( './' + subExtension + '/extension.json' )
|
||||
.MessagesDirs[ subExtension ]
|
||||
.map( function ( path ) {
|
||||
return subExtension + '/' + path;
|
||||
} );
|
||||
.map( ( path ) => subExtension + '/' + path );
|
||||
}
|
||||
|
||||
grunt.loadNpmTasks( 'grunt-banana-checker' );
|
||||
|
|
|
@ -2,5 +2,8 @@
|
|||
"globals": {
|
||||
"ve": false,
|
||||
"OO": false
|
||||
},
|
||||
"rules": {
|
||||
"no-jquery/no-extend": "warn"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
mw.loader.using( 'ext.visualEditor.targetLoader' ).then( function () {
|
||||
mw.libs.ve.targetLoader.addPlugin( function () {
|
||||
mw.loader.using( 'ext.visualEditor.targetLoader' ).then( () => {
|
||||
mw.libs.ve.targetLoader.addPlugin( () => {
|
||||
|
||||
ve.init.mw.NoCaptchaReCaptchaSaveErrorHandler = function () {};
|
||||
|
||||
|
@ -45,7 +45,7 @@ mw.loader.using( 'ext.visualEditor.targetLoader' ).then( function () {
|
|||
};
|
||||
|
||||
this.getReadyPromise()
|
||||
.then( function () {
|
||||
.then( () => {
|
||||
if ( self.widgetId ) {
|
||||
window.grecaptcha.reset( self.widgetId );
|
||||
} else {
|
||||
|
|
|
@ -2,5 +2,8 @@
|
|||
"globals": {
|
||||
"ve": false,
|
||||
"OO": false
|
||||
},
|
||||
"rules": {
|
||||
"no-jquery/no-extend": "warn"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
mw.loader.using( 'ext.visualEditor.targetLoader' ).then( function () {
|
||||
mw.libs.ve.targetLoader.addPlugin( function () {
|
||||
mw.loader.using( 'ext.visualEditor.targetLoader' ).then( () => {
|
||||
mw.libs.ve.targetLoader.addPlugin( () => {
|
||||
|
||||
ve.init.mw.TurnstileSaveErrorHandler = function () {};
|
||||
|
||||
|
@ -45,7 +45,7 @@ mw.loader.using( 'ext.visualEditor.targetLoader' ).then( function () {
|
|||
};
|
||||
|
||||
this.getReadyPromise()
|
||||
.then( function () {
|
||||
.then( () => {
|
||||
if ( self.widgetId ) {
|
||||
window.turnstile.reset( self.widgetId );
|
||||
} else {
|
||||
|
|
|
@ -2,5 +2,8 @@
|
|||
"globals": {
|
||||
"ve": false,
|
||||
"OO": false
|
||||
},
|
||||
"rules": {
|
||||
"no-jquery/no-extend": "warn"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
mw.loader.using( 'ext.visualEditor.targetLoader' ).then( function () {
|
||||
mw.libs.ve.targetLoader.addPlugin( function () {
|
||||
mw.loader.using( 'ext.visualEditor.targetLoader' ).then( () => {
|
||||
mw.libs.ve.targetLoader.addPlugin( () => {
|
||||
ve.init.mw.HCaptchaSaveErrorHandler = function () {};
|
||||
|
||||
OO.inheritClass( ve.init.mw.HCaptchaSaveErrorHandler, ve.init.mw.SaveErrorHandler );
|
||||
|
@ -42,7 +42,7 @@ mw.loader.using( 'ext.visualEditor.targetLoader' ).then( function () {
|
|||
};
|
||||
|
||||
this.getReadyPromise()
|
||||
.then( function () {
|
||||
.then( () => {
|
||||
// ProcessDialog's error system isn't great for this yet.
|
||||
target.saveDialog.clearMessage( 'api-save-error' );
|
||||
target.saveDialog.showMessage( 'api-save-error', $container, { wrap: false } );
|
||||
|
|
3873
package-lock.json
generated
3873
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -5,11 +5,11 @@
|
|||
"test": "grunt test"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint-config-wikimedia": "0.27.0",
|
||||
"eslint-config-wikimedia": "0.28.0",
|
||||
"grunt": "1.6.1",
|
||||
"grunt-banana-checker": "0.13.0",
|
||||
"grunt-eslint": "24.3.0",
|
||||
"grunt-stylelint": "0.19.0",
|
||||
"stylelint-config-wikimedia": "0.16.1"
|
||||
"grunt-stylelint": "0.20.0",
|
||||
"stylelint-config-wikimedia": "0.17.1"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
// or "fancy" type of captcha. They all expose differently named properties in the
|
||||
// API for different things in the UI. At this point we only support the SimpleCaptcha and
|
||||
// FancyCaptcha which we very intuitively detect by the presence of a "url" property.
|
||||
mw.loader.using( 'ext.visualEditor.targetLoader' ).then( function () {
|
||||
mw.libs.ve.targetLoader.addPlugin( function () {
|
||||
mw.loader.using( 'ext.visualEditor.targetLoader' ).then( () => {
|
||||
mw.libs.ve.targetLoader.addPlugin( () => {
|
||||
|
||||
ve.init.mw.CaptchaSaveErrorHandler = function () {};
|
||||
|
||||
|
@ -38,7 +38,7 @@ mw.loader.using( 'ext.visualEditor.targetLoader' ).then( function () {
|
|||
|
||||
captchaInput.on( 'load', onCaptchaLoad );
|
||||
// Save when pressing 'Enter' in captcha field as it is single line.
|
||||
captchaInput.on( 'enter', function () {
|
||||
captchaInput.on( 'enter', () => {
|
||||
target.saveDialog.executeAction( 'save' );
|
||||
} );
|
||||
|
||||
|
@ -50,7 +50,7 @@ mw.loader.using( 'ext.visualEditor.targetLoader' ).then( function () {
|
|||
return captchaInput.getCaptchaWord();
|
||||
};
|
||||
// Unregister extra fields on save attempt
|
||||
target.saveDialog.once( 'save', function () {
|
||||
target.saveDialog.once( 'save', () => {
|
||||
delete target.saveFields.wpCaptchaId;
|
||||
delete target.saveFields.wpCaptchaWord;
|
||||
} );
|
||||
|
|
Loading…
Reference in a new issue