PASTE-IT!

Holding 721M in 51805 pastes. Meet us at #paste-it.net!
Try our Mozilla Jetpack clipboard paster and our Chrome extension!
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
diff -r 5438bffad8cc twitterlex.js
--- a/twitterlex.js	Sun Jun 15 09:05:47 2008 +0200
+++ b/twitterlex.js	Sun Jun 15 09:24:40 2008 +0200
@@ -163,7 +163,7 @@ function addTwitterToList(entry) {

 	var s = document.createElement('span');
 	s.setAttribute('class', 'status');
-	s.appendChild(document.createTextNode(' '+ entry.text+' '));
+	s.innerHTML = ' '+ entry.text.replace(/(http:\/\/[^ ]+)/g, '<a href="javascript:widget.openURL(\'$1\');">$1</a>')+' ';
 	s.setAttribute('title', entry.created_at);
 	e.appendChild(s);
make URLs clickable in Twitterlex
by
Habbie
pasted
775 day(s) ago
09:24 15-06-2008
in syntax