Created
June 1, 2011 19:18
-
-
Save bruno-c/1003075 to your computer and use it in GitHub Desktop.
jira issue linker plugin for Talker
This file contains 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(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