Move getconfig out of api request

This commit is contained in:
alistair3149 2019-12-30 19:45:24 -05:00
parent 4ac41fc37e
commit ec99af3143
No known key found for this signature in database
GPG key ID: 94D081060FD3DD9C

View file

@ -92,7 +92,8 @@ window.WMTypeAhead = function ( appendTo, searchInput ) {
searchString,
typeAheadItems,
activeItem,
ssActiveIndex;
ssActiveIndex,
extractsChars = mw.config.get( 'wgCitizenSearchExchars' );
// Only create typeAheadEl once on page.
if ( !typeAheadEl ) {
@ -268,9 +269,9 @@ window.WMTypeAhead = function ( appendTo, searchInput ) {
format: 'json',
generator: 'prefixsearch',
prop: 'pageprops|pageimages|description|extracts',
exlimit: mw.config.get( 'wgCitizenMaxSearchResults' ),
exlimit: maxSearchResults,
exintro: 1,
exchars: mw.config.get( 'wgCitizenSearchExchars' ),
exchars: extractsChars,
explaintext: 1,
redirects: '',
ppprop: 'displaytitle',