Commits

Iván Flores  committed 4861817

Add: Hashtags links

  • Participants
  • Parent commits ed8f538

Comments (0)

Files changed (1)

File rm-twitter-feed.php

 
 					if (splitTweet[i].charAt(0) === "@") {
 						
-						var user = (splitTweet[i]),
+						var user = splitTweet[i],
 							userLink = '<a target="_blank" href="http://twitter.com/' + user.replace("@", "") + '">' + user +'</a>',
 							tweet = tweet.replace(user, userLink);
 					
 					}
 
+					if(splitTweet[i].charAt(0) === "#") {
+						var hash = splitTweet[i],
+							hashLink = '<a target="_blank" href="https://twitter.com/search?q=%23' + hash.replace("#", "") + '&src=hash" target="_blank">' + hash  +'</a>',
+							tweet = tweet.replace(hash, hashLink);
+					}
+
 				}