Created
February 11, 2015 16:56
-
-
Save itamarhaber/ad9d6220221aeb7fb352 to your computer and use it in GitHub Desktop.
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 replaceTokens(e,t){var n=e;for(var r in t){n=n.replace(RegExp("[$]"+r,"g"),t[r])}return n}function copyTweetForOverheard(){var e=$(".js-original-tweet");var t={fullname:$(".fullname.js-action-profile-name.show-popup-with-id",e).text(),username:$(".username",e).text(),text:$(".tweet-text",e).text(),url:window.location.href};var n='\t\t\t\t<p style="margin-top: 8px; margin-bottom: 36px;"><strong style="color: rgb(42, 130, 223); text-decoration: none;"><a href="$url" style="color: rgb(42, 130, 223); text-decoration: none;" target="_blank">$fullname $username:</a></strong> "$text"</p>';alert(replaceTokens(n,t))}copyTweetForOverheard()} |
@mjbrender just noticed this question - sure, I put it as a bookmark(let) and whenever I see a tweet that I want to copy-paste to the newsletter I just click the bookmark to open the popup, do CTRL-C and then I can CTRL-V into my draft.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@itamarhaber can I pick your brain on how you run this? I'm not JS savvy myself