mirror of
https://github.com/StarCitizenTools/mediawiki-skins-Citizen.git
synced 2024-11-27 15:50:34 +00:00
b2bd79196d
* feat: rewrite search module (WIP) There are some caveats because it is a WIP - Messages are not i18n yet - Missing placeholder suggestion thumbnail - Only REST mode works - Missing greeting message when there is no search query - Code might look like a mess (I learned JS not long ago) * refactor: remove old search module * feat: clean up search suggestion styles * feat: hide overflow for suggestion text * feat: add action API and various cleanup * feat: re-add abort controller * feat: add message support and tweaks * feat: use virtual config instead of ResourceLoader hook * fix: missing comma in const definition * feat: add ARIA attributes
15 lines
332 B
JavaScript
15 lines
332 B
JavaScript
/**
|
|
* @return {void}
|
|
*/
|
|
function initSearchLoader() {
|
|
const searchForm = document.getElementById( 'searchform' ),
|
|
searchInput = document.getElementById( 'searchInput' );
|
|
|
|
if ( searchForm && searchInput ) {
|
|
const typeahead = require( './typeahead.js' );
|
|
typeahead.init( searchForm, searchInput );
|
|
}
|
|
}
|
|
|
|
initSearchLoader();
|