Created
October 28, 2024 07:32
-
-
Save UniqueName12345/78ab08dfa9c32759975ff242a24083d0 to your computer and use it in GitHub Desktop.
takes the handle and redirects to it. most of the time, it just redirects back to bsky anyway but sometimes it can lead you to their website in case it's never directly linked
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const url = new URL(window.location.href); | |
| const isBskyUrl = url.hostname === "bsky.app" | |
| if (isBskyUrl) { | |
| const handle = url.pathname.split("/")[2]; | |
| window.location.href = `${handle}`; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment