Skip to content

Instantly share code, notes, and snippets.

@dalpert-korewireless
Last active December 3, 2015 18:44
Show Gist options
  • Select an option

  • Save dalpert-korewireless/e422d14863b609ff8e4b to your computer and use it in GitHub Desktop.

Select an option

Save dalpert-korewireless/e422d14863b609ff8e4b to your computer and use it in GitHub Desktop.
TamperMonkey Script
// ==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