()
| 581 | } |
| 582 | |
| 583 | function initRouting() { |
| 584 | const params = new URLSearchParams(window.location.search); |
| 585 | const cat = params.get('c'); |
| 586 | const query = params.get('q'); |
| 587 | |
| 588 | if (cat && !query) { |
| 589 | window.location.replace(categoryPath(cat)); |
| 590 | return; |
| 591 | } |
| 592 | |
| 593 | if (query && searchInput) { |
| 594 | searchInput.value = query; |
| 595 | renderSearch(query, { updateUrl: false }); |
| 596 | } |
| 597 | } |
| 598 | |
| 599 | function init() { |
| 600 | collectDomRefs(); |
nothing calls this directly
no test coverage detected