Page MenuHomeWickedGov Phorge

autocomplete.js
No OneTemporary

Size
496 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.startsWith( val ) )
);
}
} );
} );
}
} );

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 22, 07:42 (17 h, 53 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
fe/3e/9f663e29b901dede45c8431f7957
Default Alt Text
autocomplete.js (496 B)

Event Timeline