(function($){"use strict";$.fn.linky=function(options){this.each(function(){var $el=$(this),linkifiedContent=_linkify($el,options);$el.html(linkifiedContent)})};function _linkify($el,options){var links={twitter:{baseUrl:"https://twitter.com/",hashtagSearchUrl:"search?q="},instagram:{baseUrl:"http://instagram.com/",hashtagSearchUrl:null}},defaultOptions={mentions:false,hashtags:false,urls:true,linkTo:"twitter"},extendedOptions=$.extend(defaultOptions,options),elContent=$el.html(),urlRegEx=/((([A-Za-z]{3,9}:(?:\/\/)?)(?:[\-;:&=\+\$,\w]+@)?[A-Za-z0-9\.\-]+|(?:www\.|[\-;:&=\+\$,\w]+@)[A-Za-z0-9\.\-]+)((?:\/[\+~%\/\.\w\-]*)?\??(?:[\-\+=&;%@\.\w]*)#?(?:[\.\!\/\\\w]*))?)/g,matches;if(extendedOptions.urls){matches=elContent.match(urlRegEx);elContent=_linkifyUrls(matches,elContent)}if(extendedOptions.mentions){elContent=_linkifyMentions(elContent,links[extendedOptions.linkTo].baseUrl)}if(extendedOptions.hashtags){elContent=_linkifyHashtags(elContent,links[extendedOptions.linkTo])}return elContent}function _linkifyUrls(matches,elContent){$.each(matches,function(){if($("a[href='"+this+"']").length===0){elContent=elContent.replace(this,"<a href='"+this+"' target='_blank'>"+this+"</a>")}});return elContent}function _linkifyMentions(text,baseUrl){return text.replace(/(^|\s)@(\w+)/g,"$1<a href='"+baseUrl+"$2' target='_blank'>@$2</a>")}function _linkifyHashtags(text,links){if(links.hashtagSearchUrl===null)return text;return text.replace(/(^|\s)#(\w+)/g,"$1<a href='"+links.baseUrl+links.hashtagSearchUrl+"$2' target='_blank'>#$2</a>")}})(jQuery);
(function($){"use strict";$.fn.linky=function(options){this.each(function(){var $el=$(this),linkifiedContent=_linkify($el,options);$el.html(linkifiedContent)})};function _linkify($el,options){var links={twitter:{baseUrl:"https://twitter.com/",hashtagSearchUrl:"search?q="},instagram:{baseUrl:"http://instagram.com/",hashtagSearchUrl:null}},defaultOptions={mentions:false,hashtags:false,urls:true,linkTo:"twitter"},extendedOptions=$.extend(defaultOptions,options),elContent=$el.html(),urlRegEx=/((([A-Za-z]{3,9}:(?:\/\/)?)(?:[\-;:&=\+\$,\w]+@)?[A-Za-z0-9\.\-]+|(?:www\.|[\-;:&=\+\$,\w]+@)[A-Za-z0-9\.\-]+)((?:\/[\+~%\/\.\w\-]*)?\??(?:[\-\+=&;%@\.\w]*)#?(?:[\.\!\/\\\w]*))?)/g,matches;if(extendedOptions.urls){matches=elContent.match(urlRegEx);if(matches){elContent=_linkifyUrls(matches,elContent)}}if(extendedOptions.mentions){elContent=_linkifyMentions(elContent,links[extendedOptions.linkTo].baseUrl)}if(extendedOptions.hashtags){elContent=_linkifyHashtags(elContent,links[extendedOptions.linkTo])}return elContent}function _linkifyUrls(matches,elContent){$.each(matches,function(){if($("a[href='"+this+"']").length===0){elContent=elContent.replace(this,"<a href='"+this+"' target='_blank'>"+this+"</a>")}});return elContent}function _linkifyMentions(text,baseUrl){return text.replace(/(^|\s)@(\w+)/g,"$1<a href='"+baseUrl+"$2' target='_blank'>@$2</a>")}function _linkifyHashtags(text,links){if(links.hashtagSearchUrl===null)return text;return text.replace(/(^|\s)#(\w+)/g,"$1<a href='"+links.baseUrl+links.hashtagSearchUrl+"$2' target='_blank'>#$2</a>")}})(jQuery);
Update minified code to v0.1.1