-
Notifications
You must be signed in to change notification settings - Fork 0
/
ucb-jira-fix.user.js
30 lines (26 loc) · 1.05 KB
/
ucb-jira-fix.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
// ==UserScript==
// @name ucb-jira-fix
// @namespace https://www.feldersoft.com
// @version 1.0
// @description Sorts jira issue comments by oldest first and loads them all
// @author Jonathan Felder
// @downloadURL https://raw.githubusercontent.com/felder/userscripts/main/ucb-jira-fix.user.js
// @include https://jira-secure.berkeley.edu/*
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.6.3/jquery.min.js
// @require https://gist.github.com/raw/2625891/waitForKeyElements.js
// @grant GM_addStyle
// ==/UserScript==
(function() {
'use strict';
function clickSort() {
if (document.getElementById("sort-button").title == "Click to view oldest first") {
document.getElementById("sort-button").click();
}
}
function clickLoadAll() {
var loadall = document.querySelector('[data-load-all-message="select to load all"]');
if (loadall !== null) { loadall.click(); }
}
waitForKeyElements("#sort-button", clickSort);
waitForKeyElements(".show-more-tab-items", clickLoadAll);
})();