Skip to content

Commit

Permalink
(eslint) Fix eslint warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardspec committed Dec 7, 2024
1 parent 32806f2 commit e81cc5d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
10 changes: 5 additions & 5 deletions extension.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Moderation",
"version": "1.8.21",
"version": "1.8.22",
"author": "Edward Chernenko",
"url": "https://www.mediawiki.org/wiki/Extension:Moderation",
"descriptionmsg": "moderation-desc",
Expand Down Expand Up @@ -422,19 +422,19 @@
"value": "",
"description": "Email address to send notifications to."
},
"ModerationUseAjax": {
"ModerationUseAjax": {
"value": false,
"description": "Experimental: if true, enable Ajax handling of links on Special:Moderation."
},
"ModerationOnlyInNamespaces": {
"ModerationOnlyInNamespaces": {
"value": [],
"description": "If set to an array of namespace numbers (e.g. NS_MAIN, NS_FILE), moderation is only enabled in these namespaces (edits in other namespaces will bypass moderation). Default (empty array): moderation is enabled everywhere."
},
"ModerationIgnoredInNamespaces": {
"ModerationIgnoredInNamespaces": {
"value": [],
"description": "If set to an array of namespace numbers (e.g. NS_MAIN, NS_FILE), non-automoderated users can bypass moderation in these namespaces. Default (empty array): moderation can't be bypassed anywhere."
},
"ModerationEnableEditChange": {
"ModerationEnableEditChange": {
"value": false,
"description": "If true, moderators are allowed to edit pending changes before approving. DANGEROUS: moderator can accidentally delete the text of pending change. Enable this only when you use Moderation for pre-publish review."
}
Expand Down
4 changes: 2 additions & 2 deletions modules/ext.moderation.notify.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@
} ).done( function ( ret ) {
var parsed = ret.query.moderationpreload.parsed;
if ( parsed ) {
var $div = $( '<div>' ).html( parsed.text );
var $div2 = $( '<div>' ).html( parsed.text );
mw.hook( 'wikipage.content' ).fire(
$( '#mw-content-text' ).empty().append( $div )
$( '#mw-content-text' ).empty().append( $div2 )
);

$( '#catlinks' ).html( parsed.categorieshtml );
Expand Down
4 changes: 2 additions & 2 deletions tests/selenium/pageobjects/postedit.page.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ class PostEdit extends Page {
$( '.mw-notification-visible' ).waitForExist();
}

this.inittime = new Date().getTime(); /* Used in waitUsualFadeTime() */
this.inittime = Date.now(); /* Used in waitUsualFadeTime() */
}

/**
@brief Pause until the time when MediaWiki should have removed this notification.
*/
waitUsualFadeTime() {
browser.pause( this.usualFadeTime - ( new Date().getTime() - this.inittime ) );
browser.pause( this.usualFadeTime - ( Date.now() - this.inittime ) );
}
}

Expand Down
6 changes: 3 additions & 3 deletions tests/selenium/specs/mobilefrontend-preload.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ describe( 'When user opens MobileFrontend editor and has a pending edit', functi
} );

/* Test preloading of a single section into MobileFrontend */
for ( var idx in Sections ) {
it( 'section #' + idx + ' should be shown', function ( idx ) {
for ( var sectionNumber in Sections ) {
it( 'section #' + sectionNumber + ' should be shown', function ( idx ) {
MobileFrontend.open( PageName, idx );

browser.waitUntil( function () {
Expand All @@ -50,7 +50,7 @@ describe( 'When user opens MobileFrontend editor and has a pending edit', functi
MobileFrontend.content.getValue(),
'MobileFrontend.content[' + idx + ']' )
.to.equal( Sections[ idx ] );
}.bind( null, idx ) );
}.bind( null, sectionNumber ) );
}

it( 'edit summary should be shown', function () {
Expand Down

0 comments on commit e81cc5d

Please sign in to comment.