Last active
December 3, 2015 18:44
-
-
Save dalpert-korewireless/e422d14863b609ff8e4b to your computer and use it in GitHub Desktop.
TamperMonkey Script
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
| // ==UserScript== | |
| // @name Github Helpers | |
| // @namespace http://blog.spinthemoose.com/ | |
| // @version 0.3 | |
| // @description enter something useful | |
| // @author David Alpert | |
| // @match https://github.com/RacoWireless/*/pull*/* | |
| // @grant none | |
| // ==/UserScript== | |
| function GithubHelpers() { | |
| if (window.jQuery == 'undefined') { | |
| window.setTimeout(GithubHelpers, 100); | |
| } else { | |
| var h1 = $('h1.gh-header-title'); | |
| h1.change(function(){ | |
| var titleSpan = h1.find('span.js-issue-title'); | |
| if (titleSpan.length > 0) { | |
| var jiraBaseURL = "https://koresystemsgroup.atlassian.net/browse/"; | |
| var re = /(.*?)((TEL|BGC|SH|GEN|API|AA)(-| )(\d+))(.*)/i; | |
| var newTitle = titleSpan.text().replace(re,'$1<a href="'+jiraBaseURL+'$3-$5">$2</a>$6'); | |
| titleSpan.html(newTitle); | |
| } | |
| }); | |
| h1.change(); | |
| } | |
| } | |
| GithubHelpers(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment