search for standard sites pub-search.waow.tech
search zig blog atproto
11
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat: shareable search via ?q= URL parameter

Search queries are reflected in the URL as ?q=term, so you can
share a link like /atlas?q=techno and the recipient sees the
same search results centered on the map.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

+17 -1
+17 -1
site/atlas.js
··· 740 740 d.clusters.fine.length + ' clusters'; 741 741 document.getElementById('loading').classList.add('hidden'); 742 742 view.dirty = true; 743 + // trigger search from URL ?q= param 744 + var urlQ = new URLSearchParams(window.location.search).get('q'); 745 + if (urlQ) { 746 + searchInput.value = urlQ; 747 + doSearch(urlQ, true); 748 + } 743 749 }) 744 750 .catch(function(err) { 745 751 document.getElementById('loading').querySelector('.spinner').textContent = 'error: ' + err.message; ··· 772 778 searchCenter = null; 773 779 searchQuery = ''; 774 780 setSearchStatus(''); 781 + var url = new URL(window.location); 782 + if (url.searchParams.has('q')) { 783 + url.searchParams.delete('q'); 784 + history.replaceState(null, '', url); 785 + } 775 786 view.dirty = true; 776 787 } 777 788 778 - function doSearch(query) { 789 + function doSearch(query, skipPush) { 779 790 if (!query || !data || !uriToIndex) return; 780 791 searchQuery = query; 781 792 setSearchStatus('searching...'); 793 + if (!skipPush) { 794 + var url = new URL(window.location); 795 + url.searchParams.set('q', query); 796 + history.replaceState(null, '', url); 797 + } 782 798 783 799 fetch(API_URL + '/search?mode=semantic&limit=20&format=v2&q=' + encodeURIComponent(query)) 784 800 .then(function(r) {