Created
April 28, 2011 17:17
-
-
Save deedubs/946793 to your computer and use it in GitHub Desktop.
Simple plugin to link up mentioned Epic.IO mission Ids in your talkerapp chat
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
plugin.onMessageInsertion = function(event){ | |
if(event.content.match(/!\w{2}\d{4,}/)) { | |
var last_message = Talker.getLastRow(); | |
var contents = last_message.html(); | |
var newContents = contents.replace(/!(\w{2}\d{4,})/g,'<a style="font-weight: bold;border-bottom: 1px solid #F15c50" href="http://epic.io/$1">!$1</a>'); | |
last_message.html(newContents); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment