Sha256: f9e72466f355af5efbaaed584048bcbc4ffb7bae70ce4ff5f65f6143a6244133
Contents?: true
Size: 729 Bytes
Versions: 10
Compression:
Stored size: 729 Bytes
Contents
// Define: Linkify plugin from stackoverflow (function($){ var url2 = /(^|<|\s)(((https?|ftp):\/\/|mailto:).+?)(\s|>|$)/g; linkifyThis = function () { var childNodes = this.childNodes, i = childNodes.length; while(i--) { var n = childNodes[i]; if (n.nodeType == 3) { var html = n.nodeValue; if (html) { html = html.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(url2, '$1<a href="$2">$2</a>$5'); $(n).after(html).remove(); } } else if (n.nodeType == 1 && !/^(a|button|textarea)$/i.test(n.tagName)) linkifyThis.call(n); } }; $.fn.linkify = function () { this.each(linkifyThis); }; })(jQuery);
Version data entries
10 entries across 10 versions & 1 rubygems