/** * Adaptation of the suggest widget to query the Wikibase autocomplete API directly */ (function() { /** * Options: * mediawiki_endpoint: url of the MediaWiki API * entity_type: type of entity to suggest (one of form, item, lexeme, property, sense, mediainfo…) * language: language code of the language to search in */ $.suggest( "suggestWikibase", $.extend( true, {}, $.suggest.suggest.prototype, { create_item: function(data, response_data) { var css = this.options.css; var li = $("
  • ").addClass(css.item); var name = $("
    ") .addClass(css.item_name) .append( $("