Make JIRA Ticket Links Open Detailed View

Clicking a ticket id on a board opens the detailed ticket view in a new tab

目前为 2016-01-23 提交的版本。查看 最新版本

// ==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*
// @version     1.0.6
// @grant       none
// @locale      en
// ==/UserScript==

var tickets = document.getElementsByClassName('js-key-link');

for (var i = 0; i < tickets.length; i++) {
  tickets[i].addEventListener("click", function() {
    console.log("******BEGIN******");
    console.log(this.tagName);
    console.log("******END******");
    this.setAttribute("onclick", "window.open('" + this.getAttribute('href') + "');");
    this.setAttribute("target", "_blank");
  });
}