mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-27 15:30:42 +00:00
Add names to anonymous JS function
To have clearer stack traces. Change-Id: Ia086cef5dc916c21a94af7856715754b6bfb496b
This commit is contained in:
parent
2b5fb86f97
commit
9d02b3947a
|
@ -197,10 +197,10 @@
|
|||
abfendid: filterId,
|
||||
abflimit: 1
|
||||
} )
|
||||
.always( function () {
|
||||
.always( function removeSpinner() {
|
||||
$.removeSpinner( 'fetch-spinner' );
|
||||
} )
|
||||
.done( function ( data ) {
|
||||
.done( function insertFilter( data ) {
|
||||
if ( data.query.abusefilters[ 0 ] !== undefined ) {
|
||||
if ( useAce ) {
|
||||
filterEditor.setValue( data.query.abusefilters[ 0 ].pattern );
|
||||
|
@ -215,7 +215,7 @@
|
|||
* that don't have checked boxes
|
||||
*/
|
||||
function hideDeselectedActions() {
|
||||
$( '.mw-abusefilter-action-checkbox input' ).each( function () {
|
||||
$( '.mw-abusefilter-action-checkbox input' ).each( function showHideParams() {
|
||||
// mw-abusefilter-action-checkbox-{$action}
|
||||
var action = this.parentNode.id.substr( 31 ),
|
||||
$params = $( '#mw-abusefilter-' + action + '-parameters' );
|
||||
|
@ -253,14 +253,14 @@
|
|||
ammessages: message,
|
||||
amargs: args.join( '|' )
|
||||
} )
|
||||
.done( function ( data ) {
|
||||
.done( function parseMessage( data ) {
|
||||
api.parse( data.query.allmessages[ 0 ][ '*' ], {
|
||||
disablelimitreport: '',
|
||||
preview: '',
|
||||
prop: 'text',
|
||||
title: 'MediaWiki:' + message
|
||||
} )
|
||||
.done( function ( html ) {
|
||||
.done( function showMessage( html ) {
|
||||
$element.show().html( html );
|
||||
previewButton.setFlags(
|
||||
{ destructive: true, progressive: false }
|
||||
|
|
|
@ -94,7 +94,7 @@
|
|||
.fail( examinerTestProcessFailure );
|
||||
}
|
||||
|
||||
$( document ).ready( function () {
|
||||
$( document ).ready( function initialize() {
|
||||
$syntaxResult = $( '#mw-abusefilter-syntaxresult' );
|
||||
$( '#mw-abusefilter-examine-test' ).click( examinerTestFilter );
|
||||
} );
|
||||
|
|
|
@ -22,13 +22,13 @@
|
|||
action: 'abusefilterevalexpression',
|
||||
expression: expr
|
||||
} )
|
||||
.fail( function ( error, details ) {
|
||||
.fail( function showError( error, details ) {
|
||||
var msg = error === 'http' ? 'abusefilter-http-error' : 'unknown-error';
|
||||
$.removeSpinner( 'abusefilter-expr' );
|
||||
$( '#mw-abusefilter-expr-result' )
|
||||
.text( mw.msg( msg, details.exception ) );
|
||||
} )
|
||||
.done( function ( data ) {
|
||||
.done( function showResult( data ) {
|
||||
$.removeSpinner( 'abusefilter-expr' );
|
||||
|
||||
$( '#mw-abusefilter-expr-result' )
|
||||
|
@ -105,7 +105,7 @@
|
|||
return false;
|
||||
}
|
||||
|
||||
$( document ).ready( function () {
|
||||
$( document ).ready( function initialize() {
|
||||
$( '#mw-abusefilter-submitexpr' ).click( doExprSubmit );
|
||||
$( '#mw-abusefilter-reautoconfirmsubmit' ).click( doReautoSubmit );
|
||||
} );
|
||||
|
|
Loading…
Reference in a new issue