Merge "Remove code to disable new search on Wikidata"

This commit is contained in:
jenkins-bot 2023-01-23 14:25:22 +00:00 committed by Gerrit Code Review
commit 9650eae741

View file

@ -138,9 +138,7 @@ function markLoadEnd( startMarker, endMarker, measureMarker ) {
* @param {Document} document
*/
function initSearchLoader( document ) {
var searchBoxes = document.querySelectorAll( '.vector-search-box' ),
wikibaseNeedsLegacySearch = [ 'loading', 'loaded', 'executing', 'ready' ]
.indexOf( mw.loader.getState( 'wikibase.ui.entitysearch' ) ) !== -1;
var searchBoxes = document.querySelectorAll( '.vector-search-box' );
// Allow developers to defined $wgVectorSearchApiUrl in LocalSettings to target different APIs
if ( config.wgVectorSearchApiUrl ) {
@ -152,10 +150,9 @@ function initSearchLoader( document ) {
}
/**
* 1. If we are in a browser that doesn't support ES6 fall back to non-JS version.
* 2. Disable on Wikidata per T281318 until the REST API is ready.
* If we are in a browser that doesn't support ES6 fall back to non-JS version.
*/
if ( wikibaseNeedsLegacySearch || mw.loader.getState( 'skins.vector.search' ) === null ) {
if ( mw.loader.getState( 'skins.vector.search' ) === null ) {
document.body.classList.remove(
'skin-vector-search-vue'
);