Skip to content

Commit

Permalink
Updated YAML Headers
Browse files Browse the repository at this point in the history
  • Loading branch information
darkwing committed Dec 16, 2009
1 parent c6d2fa0 commit e3309e3
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 2 deletions.
13 changes: 13 additions & 0 deletions Docs/Tweetify.md
@@ -0,0 +1,13 @@
Element: Element.Tweetify {#Element}
=====================================

Tweetify extends Strings and Elements with the tweetify method to take text and format as a tweet.


### Syntax:

var tweeted = myString.tweetify();

### Arguments:

None
21 changes: 21 additions & 0 deletions README.md
@@ -0,0 +1,21 @@
Tweetify
=========

Tweetify extends Strings and Elements with the tweetify method to take text and format as a tweet.

![Screenshot](http://davidwalsh.name/wp-content/themes/walshbook3/images/twitter.png)


How to Use
----------

The tweetify method may be used on either String or Element types.

#JS
//Usage 1: String
var tweetText = tweets[0].tweetify();

//Usage 2: Element
$('latestTweet').tweetify();

For specific usage and options, please read the documentation or visit [http://davidwalsh.name/tweetify](http://davidwalsh.name/tweetify)
2 changes: 1 addition & 1 deletion Source/Tweetify-yui-compressed.js
Expand Up @@ -16,4 +16,4 @@ provides:
- String.tweetify
...
*/
(function(){var a=function(){return this.replace(/(https?:\/\/\S+)/gi,'<a href="$1">$1</a>').replace(/(^|\s)@(\w+)/g,'$1<a href="http://twitter.com/$2">@$2</a>').replace(/(^|\s)#(\w+)/g,'$1<a href="http://search.twitter.com/search?q=%23$2">#$2</a>');};String.implement({tweetify:a});Element.implement({tweetify:a.bind(this.get("text"))});})();
(function(){var a=function(){return this.replace(/(https?:\/\/\S+)/gi,'<a href="$1">$1</a>').replace(/(^|\s)@(\w+)/g,'$1<a href="http://twitter.com/$2">@$2</a>').replace(/(^|\s)#(\w+)/g,'$1<a href="http://search.twitter.com/search?q=%23$2">#$2</a>');};String.implement({tweetify:a});Element.implement({tweetify:function(){this.set("text",a.bind(this.get("text")).attempt());}});})();
4 changes: 3 additions & 1 deletion Source/Tweetify.js
Expand Up @@ -24,6 +24,8 @@ provides:
tweetify: fn
});
Element.implement({
tweetify: fn.bind(this.get('text'))
tweetify: function() {
this.set('text',fn.bind(this.get('text')).attempt());
}
});
})();

0 comments on commit e3309e3

Please sign in to comment.