Page MenuHomeWickedGov Phorge

autocomplete.js
No OneTemporary

Size
499 B
Referenced Files
None
Subscribers
None

autocomplete.js

/*
* HTMLForm enhancements:
* Set up autocomplete fields.
*/
mw.hook( 'htmlform.enhance' ).add( ( $root ) => {
const $autocomplete = $root.find( '.mw-htmlform-autocomplete' );
if ( $autocomplete.length ) {
mw.loader.using( 'jquery.suggestions', () => {
$autocomplete.suggestions( {
fetch: function ( val ) {
const $el = $( this );
$el.suggestions( 'suggestions',
$el.data( 'autocomplete' ).filter( ( v ) => v.indexOf( val ) === 0 )
);
}
} );
} );
}
} );

File Metadata

Mime Type
text/plain
Expires
Mon, Nov 23, 09:16 (4 d, 8 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
91/3e/ffc1d56ae489e8863c82823ad59c
Default Alt Text
autocomplete.js (499 B)

Event Timeline