Commit 12532dc9 authored by XhmikosR's avatar XhmikosR
Browse files

Remove `http` from docs search. (#28557)

We use only `https` for a few months now.
parent 3ab04416
9 merge requests!36532My v4 dev,!34086v4: Fix prevented show event disables modals with fade class from being displayed again,!33729V4 dev,!33086V4 dev,!31901Add opacity utilities,!31513Update icons.md,!30331Removed 'shrink-to-fit' from `viewport` meta,!29732V4 dev,!28937Add *-shadow classes
Showing with 8 additions and 4 deletions
+8 -4
......@@ -34,12 +34,15 @@
},
transformData: function (hits) {
return hits.map(function (hit) {
var siteurl = getOrigin()
var urlRE = /^https?:\/\/getbootstrap\.com/
var currentUrl = getOrigin()
var liveUrl = 'https://getbootstrap.com'
// When in production, return the result as is,
// otherwise remove our url from it.
hit.url = siteurl.match(urlRE) ? hit.url : hit.url.replace(urlRE, '')
// 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') {
......@@ -50,6 +53,7 @@
return hit
})
},
debug: false // Set debug to true if you want to inspect the dropdown
// Set debug to `true` if you want to inspect the dropdown
debug: false
})
}())
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment