mediawiki-skins-Vector/resources/skins.vector.search
jdlrobson 289f1d48f5 Gadgets can change the search API
```
mw.config.set('wgVectorSearchClient', {

   fetchByTitle: function( query, domain, limit ) {
      var xhr = fetch('http://' + domain + '/w/rest.php/v1/search/title?q=banana')
      .then(function (resp) {
          return resp.json();
      }).then(function (json) {
         return {
             results: json.pages
         }
      });
      return {
         fetch: xhr,
         abort: function() {}
      }
   }
})
```

This should be the absolute minimum to allow API clients to configure
the search. This should be considered an interim solution to buy us time to work out a more
elegant way to do this e.g. do this in the API itself…

Bug: T262566
Change-Id: Iac6f2551bed911980064dcb023193f800df0934f
2020-12-23 12:16:29 +00:00
..
App.vue Gadgets can change the search API 2020-12-23 12:16:29 +00:00
config.json.d.ts Add Wvui Config to show/hide thumbnails and descriptions 2020-12-08 13:28:42 -08:00
instrumentation.js [search] Add Vue search performance instrumentation 2020-12-08 23:41:28 +00:00
skins.vector.search.js [search] Instrument Vue.js-based search widget 2020-12-08 23:41:19 +00:00
types.js [search] Instrument Vue.js-based search widget 2020-12-08 23:41:19 +00:00