diff options
author | m5o <m5o@gmx.com> | 2018-03-07 17:30:13 +0300 |
---|---|---|
committer | XhmikosR <xhmikosr@gmail.com> | 2018-03-14 22:06:17 +0300 |
commit | 483e49e3c6784f4afbc9982c3498151f6f97ee30 (patch) | |
tree | 5e72a9d614ca545b032a9a6aa35900dce43d3e2d /assets/js | |
parent | d01b4eb02560ba67b61b1b2c0496e9f8281c154d (diff) |
Enable docsearch in development env.
Previously a search redirected to `https://getbootstrap.com/...`
Diffstat (limited to 'assets/js')
-rw-r--r-- | assets/js/src/application.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/assets/js/src/application.js b/assets/js/src/application.js index a067c9fb59..2d8b08d1d4 100644 --- a/assets/js/src/application.js +++ b/assets/js/src/application.js @@ -115,7 +115,8 @@ }, transformData: function (hits) { return hits.map(function (hit) { - hit.url = hit.url.replace('https://v4-alpha.getbootstrap.com', '/docs/4.0') + var baseurl = document.getElementById('search-input').getAttribute('data-baseurl') + hit.url = hit.url.replace('https://getbootstrap.com' + baseurl, baseurl) return hit }) }, |