mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-24 15:53:46 +00:00
Merge "Remove code to disable new search on Wikidata"
This commit is contained in:
commit
9650eae741
|
@ -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'
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue