I use Github Issues as a bugtracker for a number of my projects. My workflow usually includes having the ticket open in one browser tab, and a local WordPress installation open in another browser tab (to test the bugfixes themselves). When I write commit messages, I want to reference the issue number, but by default, it’s buried deep in the
<title> element, and thus not visible on a smallish browser tab.
So I wrote a short userscript that reproduces the issue number at the beginning of the
<title>, so I can see it at a glance. It’s structured as a userscript for Greasemonkey/Firefox, though I imagine you could easily repackage it for Chrome or whatever.
// @name github issue number in tab
// @namespace https://boone.gorg.es
// @description github issue number in tab
// @include https://github.com/*/*/issues/*
// @version 1
// @grant none
var t, ttext, issueno;
t = document.getElementsByTagName( ‘title’ );
ttext = t.innerHTML;
ino = ttext.match(/Issue #([0-9]+)/);
console.log(“#” + ino + ” ” + ttext);
t.innerHTML = “#” + ino + ” ” + ttext;