-
Notifications
You must be signed in to change notification settings - Fork 0
/
jiraDragDisableOnIssueFilter.js
40 lines (32 loc) · 1.05 KB
/
jiraDragDisableOnIssueFilter.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
34
35
36
37
38
39
40
// ==UserScript==
// @name Jira - drag disable on issue list
// @namespace http://tampermonkey.net/
// @version 1.0.1
// @description Disables drag option for issue rows on issue filter screen
// @author Daniel Jílek
// @match https://jira.unicorn.eu/issues/*
// @grant none
// ==/UserScript==
(function () {
'use strict';
let dragDisableTimeout = 500;
let cursorChange = function () {
//change cursor style
let rows = document.getElementsByClassName("issue-table-draggable");
for (let i = 0; i < rows.length; i++) {
rows[i].style.cursor = "default";
}
};
let dragDisable = function (timeout) {
setTimeout(function () {
// clean mousedown events from website
function handler(e) {
cursorChange();
e.stopPropagation();
}
document.addEventListener("mousedown", handler, true);
cursorChange();
}, timeout);
};
dragDisable(dragDisableTimeout);
})();