Created
August 17, 2010 09:16
-
-
Save bigwhoop/529046 to your computer and use it in GitHub Desktop.
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 Jira "Assign to me" | |
// @namespace * | |
// @include */CreateIssue.jspa | |
// ==/UserScript== | |
var target = document.getElementById('assignee'); | |
if (target.parentNode.hasChildNodes) { | |
for (var i = 0; i < target.parentNode.childNodes.length; i++) { | |
var child = target.parentNode.childNodes[i]; | |
if ('A' == child.nodeName) { | |
var str = child.getAttribute('onclick'); | |
var matches = str.match(/value = '(.*)';/i); | |
document.getElementById('assignee').value = matches[1]; | |
break; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment