graphql-engine/docs/_theme/djangodocs/search.html
2019-01-09 14:30:40 +05:30

24 lines
570 B
HTML

{% extends "layout.html" %}
{% block extrafooter %}
<!-- handle search query -->
<script>
const handleQueryParams = function() {
const urlParams = new URLSearchParams(window.location.search);
const searchTerm = urlParams.get('query');
if (searchTerm) {
const searchInput = document.getElementById('search_element');
searchInput.value = searchTerm;
searchInput.dispatchEvent(new Event('input'));
}
};
if (window.location.search.length > 0) {
handleQueryParams();
}
</script>
{% endblock %}