Created
September 12, 2022 16:27
-
-
Save avin/5484586db7a0e5bbac2dbf6b3d899e34 to your computer and use it in GitHub Desktop.
JIRA Sort comments same way
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Protect classic sort for JIRA comments | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @author You | |
// @match https://rbs-develop.paymentgate.ru/* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
const protectClassicSort = () => { | |
const $sortButtonEl = $('.issue-activity-sort-link')[0]; | |
if($sortButtonEl){ | |
const order = $sortButtonEl.dataset.order; | |
if(order === 'asc'){ | |
$sortButtonEl.click() | |
} | |
} | |
} | |
setInterval(protectClassicSort, 1000); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment