Make JIRA Ticket Links Open Detailed View

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

La data de 23-01-2016. Vezi ultima versiune.

// ==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.1
// @grant       none
// @locale      en
// ==/UserScript==

function addOnClick() {
  this.onclick = function() {
    console.log(this.getAttribute('href'));
    window.open(this.getAttribute('href'));
  }
  this.setAttribute('target', '_blank');
}

console.log('runs');

document.getElementsByClassName('js-key-link').addEventListener('click', addOnClick);