Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Paste
P7434
(An Untitled Masterwork)
Active
Public
Actions
Authored by
matmarex
on Aug 7 2018, 8:14 PM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Flag For Later
Tags
None
Referenced Files
F24652024:
Aug 7 2018, 8:14 PM
2018-08-07 20:14:30 (UTC+0)
Subscribers
xSavitar
AffiliateLookupTextInputWidget.prototype.getLookupRequest = function () {
var value = this.getValue();
return this.getValidity().then( function () {
// Query the API to get the list of affiliates
return new mw.Api().get( queryAffiliatesPage() ).then( function ( data ) {
var affiliates, affiliatesContent;
affiliatesContent = getAffiliatesList( data.query.pages );
affiliates = affiliatesContent.split(',');
// Filter to only affiliates whose names contain the input (case-insensitive)
affiliates = affiliates.filter( function ( v ) {
return v.toLowerCase().indexOf( value.toLowerCase() ) !== -1;
} );
return affiliates;
} );
}, function () {
// No results when the input contains invalid content
return [];
} );
};
Event Timeline
matmarex
created this paste.
Aug 7 2018, 8:14 PM
2018-08-07 20:14:30 (UTC+0)
xSavitar
subscribed.
Aug 7 2018, 8:19 PM
2018-08-07 20:19:12 (UTC+0)
Salgo60
mentioned this in
T237950: Feedback errors in Wikidata <-> TORA
.
Nov 11 2019, 11:46 AM
2019-11-11 11:46:45 (UTC+0)
Log In to Comment