Skip to content

Instantly share code, notes, and snippets.

@avin
Created September 12, 2022 16:27
Show Gist options
  • Save avin/5484586db7a0e5bbac2dbf6b3d899e34 to your computer and use it in GitHub Desktop.
Save avin/5484586db7a0e5bbac2dbf6b3d899e34 to your computer and use it in GitHub Desktop.
JIRA Sort comments same way
// ==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