mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-28 00:00:49 +00:00
Rename config.references to config.addReference
Change-Id: I5e4b70d8bff1e9b26ca78f9f6f8c9ac8d5f7297b
This commit is contained in:
parent
cd43f126d1
commit
a59335fac6
|
@ -13,7 +13,7 @@ use MessageLocalizer;
|
||||||
|
|
||||||
class ResourceLoaderData {
|
class ResourceLoaderData {
|
||||||
protected static array $defaults = [
|
protected static array $defaults = [
|
||||||
'references' => [
|
'addReference' => [
|
||||||
'minimumCharacters' => 50,
|
'minimumCharacters' => 50,
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
|
@ -51,7 +51,7 @@ mw.editcheck.findAddedContentNeedingReference = function ( documentModel, includ
|
||||||
return offset < endOffset;
|
return offset < endOffset;
|
||||||
} );
|
} );
|
||||||
var addedTextRanges = ranges.filter( function ( range ) {
|
var addedTextRanges = ranges.filter( function ( range ) {
|
||||||
var minimumCharacters = mw.editcheck.config.references.minimumCharacters;
|
var minimumCharacters = mw.editcheck.config.addReference.minimumCharacters;
|
||||||
// 1. Check that at least minimumCharacters characters have been inserted sequentially
|
// 1. Check that at least minimumCharacters characters have been inserted sequentially
|
||||||
if ( range.getLength() >= minimumCharacters ) {
|
if ( range.getLength() >= minimumCharacters ) {
|
||||||
// 2. Exclude any ranges that already contain references
|
// 2. Exclude any ranges that already contain references
|
||||||
|
|
Loading…
Reference in a new issue