Created
May 20, 2009 20:01
-
-
Save jphastings/115054 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
// Lets javascript add twitter links to @reply style text items in any selected html elements | |
// Requires MooTools' selectors | |
function tumblrTweets(selector) { | |
$$(selector).each(function(t) { | |
t.set('html',t.get('html').replace(/@([a-zA-Z0-9_]+)/,"<a href=\"http://twitter.com/$1\">$1</a>")); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment