5 n
= document
.createNodeIterator(
7 NodeFilter
.SHOW_TEXT
| NodeFilter
.SHOW_ELEMENT
,
9 return 1 !== e
.nodeType
10 ? NodeFilter
.FILTER_ACCEPT
12 ? NodeFilter
.FILTER_REJECT
13 : NodeFilter
.FILTER_SKIP
;
17 null !== (t
= n
.nextNode());
20 var r
= /\b((?:https?:\/\/|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>“”‘’'"]+|\(([^\s()<>“”‘’'"]+|(\([^\s()<>“”‘’'"]+\)))*\))+(?:\(([^\s()<>“”‘’'"]+|(\([^\s()<>“”‘’'"]+\)))*\)|[^\s`!()\[\]{};:.,<>?«»“”‘’'"]))/i,
24 a
= document
.createElement('a');
25 a
.setAttribute('target', '_blank'),
26 a
.setAttribute('rel', 'nofollow'),
28 i
.match(/^https?:\/\//)
29 ? a
.setAttribute('href', i
)
30 : a
.setAttribute('href', 'http://' + i
);
31 var d
= t
.splitText(o
.index
);
32 (d
.nodeValue
= d
.nodeValue
.substr(i
.length
)), t
.parentNode
.insertBefore(a
, d
), n
.nextNode();
38 'function' == typeof define
&&
40 define([], function() {