mirror of
https://github.com/twbs/bootstrap.git
synced 2025-02-20 17:54:23 +01:00
Better handling of redirects
This commit is contained in:
parent
ab9a5f0256
commit
5c704d77ca
@ -42,15 +42,13 @@
|
|||||||
apiKey: '48cb48b22351bc71ea5f12f4d1ede198',
|
apiKey: '48cb48b22351bc71ea5f12f4d1ede198',
|
||||||
indexName: 'bootstrap-v4',
|
indexName: 'bootstrap-v4',
|
||||||
inputSelector: '#search-input',
|
inputSelector: '#search-input',
|
||||||
debug: true // Set debug to true if you want to inspect the dropdown
|
transformData: function (hits) {
|
||||||
});
|
return hits.map(function (hit) {
|
||||||
|
hit.url = hit.url.replace('https://v4-alpha.getbootstrap.com', '');
|
||||||
docsearch.autocomplete.on('autocomplete:selected', function(event, suggestion) {
|
return hit;
|
||||||
location.href = suggestion.url.replace("https://v4-alpha.getbootstrap.com", "");
|
});
|
||||||
}).on('keypress', function(event) {
|
},
|
||||||
if (event.keyCode === 13) {
|
debug: false // Set debug to true if you want to inspect the dropdown
|
||||||
location.href = suggestion.url.replace("https://v4-alpha.getbootstrap.com", "")
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user