diff --git a/website/view.js b/website/view.js index 2140ff7..b421b94 100644 --- a/website/view.js +++ b/website/view.js @@ -14,4 +14,11 @@ if (searchbox != null) { searchTriggered() } } -} \ No newline at end of file +} + +// If the URL has a hash (e.g. #ubuntu iso), search for it. +if (window.location.hash) { + // `substr(1)` to trim off the leading `#`, `decodeURIComponent` to handle things like `%20` for ` `. + searchbox.value = decodeURIComponent(window.location.hash.substr(1)); + searchTriggered(); +}