Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxime Locqueville <maxiloc@gmail.com>2017-05-29 07:43:53 +0300
committerMark Otto <markd.otto@gmail.com>2017-05-30 09:32:28 +0300
commitab9a5f0256d5b1f91b44f28448b9c96de6baa988 (patch)
treebff9307560d6ab949c0a4bfede509dbace5471fb /_includes
parent3e76d6565603fafa2c85ad81d7b6345c4e279c72 (diff)
remove origin from url to be able to redirect locally
Diffstat (limited to '_includes')
-rw-r--r--_includes/footer.html14
1 files changed, 11 insertions, 3 deletions
diff --git a/_includes/footer.html b/_includes/footer.html
index 4747abf244..4b639ea21a 100644
--- a/_includes/footer.html
+++ b/_includes/footer.html
@@ -36,14 +36,22 @@
<script src="{{ site.baseurl }}/assets/js/ie-emulation-modes-warning.js"></script>
{% if page.layout == "docs" %}
-<script src="https://cdn.jsdelivr.net/docsearch.js/2/docsearch.min.js"></script>
-<script>
- docsearch({
+<script type="text/javascript" src="https://cdn.jsdelivr.net/docsearch.js/2/docsearch.min.js"></script>
+<script type="text/javascript">
+ var docsearch = docsearch({
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", "")
+ }
+ });
</script>
{% endif %}