Last active
May 1, 2024 21:09
-
-
Save ipatalas/ad19a972f221ac68608acf26aa8e2ce0 to your computer and use it in GitHub Desktop.
JIRA bookmarklets
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
let urlParams = new URLSearchParams(location.search); | |
let fromUrl = /\/browse\/(.*)/.exec(location.pathname); | |
let jiraId; | |
if (urlParams.has('selectedIssue')) { | |
jiraId = urlParams.get('selectedIssue'); | |
} else if (fromUrl) { | |
jiraId = fromUrl[1]; | |
} | |
if (jiraId) { | |
navigator.clipboard.writeText(jiraId); | |
} else { | |
alert("Couldn't find JIRA ticket ID"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Installation: