Created
February 7, 2013 15:13
-
-
Save saml/4731524 to your computer and use it in GitHub Desktop.
bookmarklet for greenhopper version board direct link to specific project and board
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
(function(){ | |
var pid = jQuery('#project-avatar').attr('src').match(/pid=(\d+)/)[1]; | |
var go = function(pid) { | |
var bid = jQuery('#gh-bc-options .gh-selected a').attr('href').match(/changeView\(.(\d+)/)[1]; | |
window.location.href = '/secure/VersionBoard.jspa?selectedBoardId=' + bid + '&selectedProjectId=' + pid; | |
}; | |
var a = jQuery('#gh-bc-boards a'); | |
if (a.length === 1) { | |
Boards.getDropdownOptions('gh-bc', 'BoardOptions'); | |
} | |
window.setTimeout(function() { | |
go(pid); | |
}, 500); | |
}()); | |
//javascript:(function(){var%20pid=jQuery('%23project-avatar').attr('src').match(/pid=(\d+)/)[1];var%20go=function(pid){var%20bid=jQuery('%23gh-bc-options%20.gh-selected%20a').attr('href').match(/changeView\(.(\d+)/)[1];window.location.href='/secure/VersionBoard.jspa%3FselectedBoardId='+bid+'%26selectedProjectId='+pid;};var%20a=jQuery('%23gh-bc-boards%20a');if(a.length===1){Boards.getDropdownOptions('gh-bc','BoardOptions');}window.setTimeout(function(){go(pid);},500);})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment