diff options
author | Mario <mario@mariovavti.com> | 2021-09-08 07:43:40 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2021-09-08 07:43:40 +0000 |
commit | 4c5f0a05c75cc66113f589a3ffe6df351abb1273 (patch) | |
tree | 15148d08a99f8375992e554a90e6d4333286a7cc /vendor/twbs/bootstrap/site/assets/js/search.js | |
parent | 952407363e245d41986cfb90e4ccf509bddc7322 (diff) | |
parent | 977a55eb8423745e4d88257b704d3e36f7337b9f (diff) | |
download | volse-hubzilla-6.2.tar.gz volse-hubzilla-6.2.tar.bz2 volse-hubzilla-6.2.zip |
Merge branch '6.2RC'6.2
Diffstat (limited to 'vendor/twbs/bootstrap/site/assets/js/search.js')
-rw-r--r-- | vendor/twbs/bootstrap/site/assets/js/search.js | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/vendor/twbs/bootstrap/site/assets/js/search.js b/vendor/twbs/bootstrap/site/assets/js/search.js index 724c6aa33..d88263d3f 100644 --- a/vendor/twbs/bootstrap/site/assets/js/search.js +++ b/vendor/twbs/bootstrap/site/assets/js/search.js @@ -11,20 +11,14 @@ return } - var siteDocsVersion = inputElement.getAttribute('data-docs-version') + var siteDocsVersion = inputElement.getAttribute('data-bd-docs-version') - function getOrigin() { - var location = window.location - var origin = location.origin - - if (!origin) { - var port = location.port ? ':' + location.port : '' - - origin = location.protocol + '//' + location.hostname + port + document.addEventListener('keydown', function (event) { + if (event.ctrlKey && event.key === '/') { + event.preventDefault() + inputElement.focus() } - - return origin - } + }) window.docsearch({ apiKey: '5990ad008512000bba2cf951ccf0332f', @@ -35,10 +29,9 @@ }, transformData: function (hits) { return hits.map(function (hit) { - var currentUrl = getOrigin() var liveUrl = 'https://getbootstrap.com/' - hit.url = currentUrl.lastIndexOf(liveUrl, 0) === 0 ? + hit.url = window.location.origin.startsWith(liveUrl) ? // On production, return the result as is hit.url : // On development or Netlify, replace `hit.url` with a trailing slash, |