1function Purify(text) {
2 var urlRegex = /^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$/;
3 return text.replace(urlRegex, function (url) {
4 return '<a class="text-blurple" target="_blank" href="' + url + '">' + url + '</a>';
5 })
6}