Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions bluesky-thread.html
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,10 @@ <h1>Bluesky Thread Viewer</h1>
container.innerHTML = '';
copyContainer.style.display = 'none';
lastThread = null;
// Update URL with the submitted post URL
const newUrl = new URL(window.location);
newUrl.searchParams.set('url', postUrl.value.trim());
history.replaceState(null, '', newUrl);
try {
const url = new URL(postUrl.value.trim());
if (url.hostname !== 'bsky.app') throw new Error('URL must be from bsky.app');
Expand Down Expand Up @@ -247,6 +251,14 @@ <h1>Bluesky Thread Viewer</h1>
container.textContent = 'Error: ' + err.message;
}
});

// Check for ?url= query parameter on page load
const params = new URLSearchParams(window.location.search);
const urlParam = params.get('url');
if (urlParam) {
postUrl.value = urlParam;
form.requestSubmit();
}
})();
</script>
</body>
Expand Down