···11+<!--
22+SPDX-FileCopyrightText: 2026 Freshly Baked Cake
33+44+SPDX-License-Identifier: MIT
55+-->
66+77+<script>
88+{
99+ const locationFilter = document.getElementById("location-filter");
1010+ let desiredLocation = GetUriParam("location");
1111+ if (locationFilter !== null && desiredLocation !== null)
1212+ {
1313+ if (locationFilter.selectedOptions.length === 0 || locationFilter.selectedOptions[0].value === "all") {
1414+ // Don't trigger if we select a different option and refresh the page
1515+ desiredLocation = desiredLocation.replaceAll("_", " ") // WikiText needs underscores to be spaces
1616+ const option = locationFilter.querySelector(`option[value="${desiredLocation}"]`)
1717+ ?? locationFilter.querySelector(`option[value^="${desiredLocation}"]`)
1818+ ?? locationFilter.querySelector(`option[value*="${desiredLocation}"]`);
1919+ // Search first for an exact match, then a match which starts with, then a match which contains
2020+ if (option) {
2121+ locationFilter.value = option.value;
2222+ locationFilter.dispatchEvent(new Event('change'));
2323+ }
2424+ }
2525+ }
2626+}
2727+</script>