Last active
April 1, 2023 01:10
-
-
Save caseywatts/be0674debcfe35ee26bcc6d4a64f0f3d to your computer and use it in GitHub Desktop.
Toot to Twitter Bookmarklet
This file contains 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
javascript: (function () { | |
const tootContents = encodeURIComponent( | |
document | |
.getElementsByClassName("detailed-status")[0] | |
.getElementsByClassName("status__content__text")[0].innerText | |
); | |
const twitterLink = `https://twitter.com/intent/tweet?text=${tootContents}`; | |
window.location.href = twitterLink; | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment