Skip to content

Instantly share code, notes, and snippets.

@dougn
Last active December 18, 2015 07:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dougn/5746653 to your computer and use it in GitHub Desktop.
Save dougn/5746653 to your computer and use it in GitHub Desktop.
FogBugz Customization to open all unread cases in tabs
name: View All Unread Cases
description: Adds a link to the titlebar (if there is one) to open all unread cases in new windows.
author: Daniel Jalkut, Doug Napoleone
version: 1.0.0.0
js:
// Based on original code by Daniel Jalkut: https://gist.github.com/danielpunkass/5612389
// but not one line of code survived.
if ($('div.viewMoreOptions')) {
var unread = $('td div nobr span a.uvb:not(.title)');
if (unread.length) {
$('div.viewMoreOptions')
.prepend('<a href="javascript:;" id="idCustomDougCA2" ' +
'class="novisited listNavLink dotted">' +
'View ' + unread.length + ' Unread Cases</a> | ');
$('#idCustomDougCA2').click(function () {
$.each(unread, function(i, node) {
var newWindow = window.open(node.href, "_blank");
});
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment