Skip to content

Instantly share code, notes, and snippets.

View truthdoug's full-sized avatar

Doug Harris truthdoug

View GitHub Profile
@truthdoug
truthdoug / copy-jira-info.js
Created September 13, 2023 13:26
Bookmarklet for copying some info about a JIRA ticket in a format that works well for slack
const title=document.querySelector("title");
var text=title.innerText.replace(' - JIRA','');
if (text.length > 75) {
text=text.substr(0,75) + '…';
}
const link=`<a href="${document.location.href}">${text}</a>`;
const blobHtml = new Blob([link], { type: "text/html" });
const blobText = new Blob([text], { type: "text/plain" });
const data = [new ClipboardItem({
["text/plain"]: blobText,
usermap.txt: users.csv
csvcut -c 1,2 users.csv | csvformat -T > usermap.txt