diff --git a/docs/res/js/search.js b/docs/res/js/search.js index c63672e7..1b33980b 100644 --- a/docs/res/js/search.js +++ b/docs/res/js/search.js @@ -147,6 +147,7 @@ function updateSearch() { } else { exactMatch.style.display = ""; buildList(null, exactList, [destination, destinationu]); + return destinationu[0]; } } else { contentDiv.style.display = ""; @@ -169,4 +170,8 @@ if (query) { searchBox.value = query; } -updateSearch(); +var exactUrl = updateSearch(); +var redirect = getQuery('redirect'); +if (exactUrl && redirect != 'no') { + window.location = exactUrl; +}