Constructor
new mw.editcheck.SourceVerificationEditCheck([state], [config], [includeSuggestions])
#
SourceVerificationEditCheck
Displays suggestions provided by the AI Source Verification script
Methods
followedByUrl(documentModel, expectedUrls, range) → {Object|null}
#
null}
#
Check if the reference node(s) that immediately follow the given range contain the expected source URL(s)
Validates one reference node per URL, in order. Returns array of matched reference nodes and the url that they matched, or the reason matching failed.
Parameters:
| Name | Type | Description |
|---|---|---|
documentModel |
ve.dm.Document | |
expectedUrls |
Array.<string> | Ordered list of expected source URLs |
range |
ve.Range | Range that the expected URLs should follow |
Returns:
- Type
-
Object
|
null
Check if the reference node(s) that immediately follow the given range contain the expected source URL(s)
Validates one reference node per URL, in order.
insertFailedVerificationTemplate(fragment, templateToInsert) → {}
#
Insert a template that indicates a source does not support a claim
Parameters:
| Name | Type | Description |
|---|---|---|
fragment |
ve.dm.LinearFragment | Fragment after which the template should be inserted |
templateToInsert |
string | Name of template to insert to communicate the source doesn't support the claim |
Returns:
promise that will resolve after template is inserted
- Type
logSuggestionNotApplied(suggestion, reason)static
#
Send VEFU events if suggestion could not be applied
Tracks as 'invalidated' if it had been applied in this session, otherwise 'stale' Includes suggestion id and reason it could not be applied
Parameters:
| Name | Type | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
suggestion |
Object |
Properties:
|
||||||||||||
reason |
string |
Send VEFU events if suggestion could not be applied
Tracks as 'invalidated' if it had been applied in this session, otherwise 'stale' Includes suggestion id and reason it could not be applied