Automatically redirect on documentation for exact matches

This commit is contained in:
Lonami Exo 2018-03-10 11:52:31 +01:00
parent 2fb42772c6
commit 1ad7712fde

View File

@ -147,6 +147,7 @@ function updateSearch() {
} else { } else {
exactMatch.style.display = ""; exactMatch.style.display = "";
buildList(null, exactList, [destination, destinationu]); buildList(null, exactList, [destination, destinationu]);
return destinationu[0];
} }
} else { } else {
contentDiv.style.display = ""; contentDiv.style.display = "";
@ -169,4 +170,8 @@ if (query) {
searchBox.value = query; searchBox.value = query;
} }
updateSearch(); var exactUrl = updateSearch();
var redirect = getQuery('redirect');
if (exactUrl && redirect != 'no') {
window.location = exactUrl;
}