tweetParser.js was created for situations where tweet text needs to be embedded on a page, or you need to properly transform raw text into Twitter-friendly text.
The plugin goes over a text and does several things. The first is to transforms text that is formatted like an URL into an actual link.
The second is to find any user mentions in the form of "@username" and transform that text into a link pointing to a Twitter profile of http://twitter.com/username.
The third is to search for any hashtags in the form of "#hashtag" and link that hashtag to the proper Twitter search page for that specific term.
An option in the tweetParser.js plugin lets developers set the target of all links to whatever they want, with the default value being "_blank" (opening the links in a new tab).
A demo is included with the download package.
The plugin is also available as a PHP library as the Tweet_Parser project.
Requirements:
- JavaScript enabled on client side
- jQuery
תגובות לא נמצא