Skip to content

Instantly share code, notes, and snippets.

Avatar

Andreas Demetriou androsland

  • Cyprus
  • 18:59 (UTC +02:00)
View GitHub Profile
@androsland
androsland / bookmarklet-copy-jira-ticket-name.html
Created Dec 13, 2022
Bookmarklet to copy the JIRA ticket link and name you are currently viewing so you can quickly paste it in your standups!
View bookmarklet-copy-jira-ticket-name.html
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._i0