mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 09:22:43 +03:00
24 lines
570 B
HTML
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 %}
|