Skip to content

Instantly share code, notes, and snippets.

@deedubs
Created April 28, 2011 17:17
Show Gist options
  • Save deedubs/946793 to your computer and use it in GitHub Desktop.
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
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