Clicking a ticket id on a board opens the detailed ticket view in a new tab
目前為
// ==UserScript==
// @name Make JIRA Ticket Links Open Detailed View
// @namespace chriskim06
// @description Clicking a ticket id on a board opens the detailed ticket view in a new tab
// @include https://*jira*com/secure/*Board*
// @require https://greasyfork.org/scripts/5392-waitforkeyelements/code/WaitForKeyElements.js?version=19641
// @version 1.1.2
// @grant none
// @locale en
// ==/UserScript==
waitForKeyElements(".js-key-link", addOnClick);
function addOnClick(jNode) {
console.log("JNODE: " + jNode.tagName);
jNode.setAttribute("onclick", "window.open('" + jNode.getAttribute("href") + "'); return false;");
jNode.setAttribute("target", "_blank");
// var tickets = document.getElementsByClassName("js-key-link");
// for (var i = 0; i < tickets.length; i++) {
// tickets[i].setAttribute("onclick", "window.open('" + tickets[i].getAttribute("href") + "'); return false;");
// tickets[i].setAttribute("target", "_blank");
// }
}