-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.user.js
33 lines (31 loc) · 1.1 KB
/
index.user.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// ==UserScript==
// @name Jira Links
// @version 0.6
// @description Jira links in a new tab
// @namespace https://github.com/seliver/
// @match https://*.atlassian.net/secure/RapidBoard.jspa*
// @match https://*.atlassian.com/browse/*
// @match https://*.atlassian.com/browse/*?*
// @author Alexey Seliverstov
// @updateURL https://raw.githubusercontent.com/seliver/jira-links-newtab/master/index.user.js
// @downloadURL https://raw.githubusercontent.com/seliver/jira-links-newtab/master/index.user.js
// ==/UserScript==
var a = function(){
var internalLinks = document.querySelectorAll("a.issue-link");
internalLinks.forEach(function(internalLink){
internalLink.classList.remove('issue-link');
internalLink.classList.add('external-link');
});
var elems = document.querySelectorAll("a.external-link");
for (var i=0; i<elems.length; i++){
var elem = elems[i];
if (elem.target != '_blank'){
elem.target = '_blank';
}
}
setTimeout(a, 1000);
};
(function() {
'use strict';
a();
})();