Skip to content

Instantly share code, notes, and snippets.

@androsland
Created December 13, 2022 07:26
Show Gist options
  • Save androsland/2049d51aed55ed40fb4008430a60e992 to your computer and use it in GitHub Desktop.
Save androsland/2049d51aed55ed40fb4008430a60e992 to your computer and use it in GitHub Desktop.
Bookmarklet to copy the JIRA ticket link and name you are currently viewing so you can quickly paste it in your standups!
javascript:(function(){function copyText(e){var i=document.createElement("textarea"),t=document.getSelection();i.textContent=e,document.body.appendChild(i),t.removeAllRanges(),i.select(),document.execCommand("copy"),t.removeAllRanges(),document.body.removeChild(i)}var ticketNumber=document.querySelector("#jira-issue-header > div > div > div > nav > ol > div:nth-child(4) > li > a > span"),createA=document.createElement("a"),createAText=document.createTextNode(ticketNumber.innerHTML);createA.setAttribute("href",window.location),createA.appendChild(createAText);var ticketName=document.querySelector("#ak-main-content > div > div > div._4t3i1osq._1e0c1txw._2lx21bp4 > div._4t3i1osq._kqswh2mm > div._kqswh2mm._4t3i1osq > div._ogwtidpf._6tinidpf._1cezidpf._m3zkidpf._7yjtidpf._ldgnidpf._un3pidpf._29hzidpf._4t3i1osq._1e0c1txw._2lx21bp4._15y61q9c._k8em1osq._dzc24jg8 > div > div._1reo1e7b._18m92qvy._12ji1r31._1qu2glyw._12y31o36._16jlkb7n._1o9zidpf._i0dlidpf._1ul9xilx._19bv18bx > div > div._1e0c1txw._16jlkb7n._1o9zkb7n._i0dl1wug._1ul9idpf._1bsb1osq > div > div > div > form > div > div > div > div > h1");copyText(createA+": "+ticketName.innerHTML);})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment