From: Maxime Locqueville Date: Mon, 29 May 2017 06:34:03 +0000 (+0200) Subject: Better handling of redirects X-Git-Tag: v4.0.0-beta~187^2~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5c704d77ca917c318fe500b4b6513089fe22fa53;p=thirdparty%2Fbootstrap.git Better handling of redirects --- diff --git a/_includes/footer.html b/_includes/footer.html index 4b639ea21a..a2f74e0707 100644 --- a/_includes/footer.html +++ b/_includes/footer.html @@ -42,15 +42,13 @@ apiKey: '48cb48b22351bc71ea5f12f4d1ede198', indexName: 'bootstrap-v4', inputSelector: '#search-input', - debug: true // Set debug to true if you want to inspect the dropdown - }); - - docsearch.autocomplete.on('autocomplete:selected', function(event, suggestion) { - location.href = suggestion.url.replace("https://v4-alpha.getbootstrap.com", ""); - }).on('keypress', function(event) { - if (event.keyCode === 13) { - location.href = suggestion.url.replace("https://v4-alpha.getbootstrap.com", "") - } + transformData: function (hits) { + return hits.map(function (hit) { + hit.url = hit.url.replace('https://v4-alpha.getbootstrap.com', ''); + return hit; + }); + }, + debug: false // Set debug to true if you want to inspect the dropdown }); {% endif %}