-
-
Save PSingletary/b77611c803f3cc4eab834bd5ece6dc99 to your computer and use it in GitHub Desktop.
Bookmarklet that opens current bsky.app post in Skythread
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
| // bookmarklet | |
| javascript:(function()%7Blet%20s=%22https://skythread.mackuba.eu/%22;let%20l=location;if(l.href.includes(%22/post/%22))%7Blet%20u=s+%22?q=%22+encodeURIComponent(l.href);let%20a=document.createElement('a');a.target='_blank';a.href=u;a.click()%7Delse%7Bl.href=s%7D%7D()) | |
| // unwrapped code: | |
| (function() { | |
| let s = "https://skythread.mackuba.eu/"; | |
| let l = location; | |
| if (l.href.includes("/post/")) { | |
| let u = s + "?q=" + encodeURIComponent(l.href); | |
| let a = document.createElement('a'); | |
| a.target = '_blank'; | |
| a.href = u; | |
| a.click(); | |
| } else { | |
| l.href = s; | |
| } | |
| }()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment