You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
760 B
JavaScript
25 lines
760 B
JavaScript
app = new Vue({
|
|
el: '#app',
|
|
data: { showsearchbox: false, error: "", resultPage: "", resultPageHeight: 1, entries: -1 }
|
|
})
|
|
window.addEventListener("message", receiveMessage, false);
|
|
|
|
function receiveMessage(event) {
|
|
app.resultPageHeight = event.data
|
|
}
|
|
searchbox = document.getElementById('searchbox')
|
|
if (searchbox != null) {
|
|
searchbox.onkeydown = function (event) {
|
|
if (event.keyCode == 13) {
|
|
searchTriggered()
|
|
}
|
|
}
|
|
}
|
|
|
|
// 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();
|
|
}
|