diff options
| author | XhmikosR <[email protected]> | 2019-11-26 19:12:00 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2019-11-26 19:12:00 +0200 |
| commit | 593574d510050dc2d5eeafe70a58ae182f020480 (patch) | |
| tree | 043a163d6c712121ca0fe1f34c419ab592b03185 /site/docs/4.3/assets/js/src/search.js | |
| parent | d61bba584f89c7df0d780a9ff214a58f7b58cb94 (diff) | |
| download | bootstrap-4.4.0.tar.xz bootstrap-4.4.0.zip | |
Release v4.4.0 (#29735)v4.4.0
Diffstat (limited to 'site/docs/4.3/assets/js/src/search.js')
| -rw-r--r-- | site/docs/4.3/assets/js/src/search.js | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/site/docs/4.3/assets/js/src/search.js b/site/docs/4.3/assets/js/src/search.js deleted file mode 100644 index dd2a90e58..000000000 --- a/site/docs/4.3/assets/js/src/search.js +++ /dev/null @@ -1,59 +0,0 @@ -// NOTICE!! DO NOT USE ANY OF THIS JAVASCRIPT -// IT'S ALL JUST JUNK FOR OUR DOCS! -// ++++++++++++++++++++++++++++++++++++++++++ - -(function () { - 'use strict' - - if (!window.docsearch) { - return - } - - var inputElement = document.getElementById('search-input') - var siteDocsVersion = inputElement.getAttribute('data-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 - } - - return origin - } - - window.docsearch({ - apiKey: '5990ad008512000bba2cf951ccf0332f', - indexName: 'bootstrap', - inputSelector: '#search-input', - algoliaOptions: { - facetFilters: ['version:' + siteDocsVersion] - }, - transformData: function (hits) { - return hits.map(function (hit) { - var currentUrl = getOrigin() - var liveUrl = 'https://getbootstrap.com' - - // When in production, return the result as is, - // otherwise remove our url from it. - // eslint-disable-next-line no-negated-condition - hit.url = currentUrl.indexOf(liveUrl) !== -1 - ? hit.url - : hit.url.replace(liveUrl, '') - - // Prevent jumping to first header - if (hit.anchor === 'content') { - hit.url = hit.url.replace(/#content$/, '') - hit.anchor = null - } - - return hit - }) - }, - // Set debug to `true` if you want to inspect the dropdown - debug: false - }) -}()) |
