Skip to content

Instantly share code, notes, and snippets.

@bruno-c
Created June 1, 2011 19:18
Show Gist options
  • Save bruno-c/1003075 to your computer and use it in GitHub Desktop.
Save bruno-c/1003075 to your computer and use it in GitHub Desktop.
jira issue linker plugin for Talker
plugin.onMessageInsertion = function(talkerEvent){
// Change those values with yours.
// When you type JIRA-1234, it will automatically convert it to a link
var jiraServer = 'https://xxx.xxx.com'
, browseLink = '<a href="' + jiraServer + '/browse/$1" target="_blank">$1</a>'
, jiraPrefix = 'AE-'
, jiraRegex = new RegExp('('+jiraPrefix+'\\d+\\b)', 'gi');
$('td.message,span.msg').replace(jiraRegex, browseLink);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment