Greasy Fork

Atlassian JIRA - Auto-expand Issue Links

Automatically expands the Issue Links list. By default, it's 5 and it's hardcoded: https://community.atlassian.com/t5/Jira-questions/Is-it-possible-to-change-the-number-of-Issue-Links-that-display/qaq-p/103076

目前为 2021-02-26 提交的版本。查看 最新版本

// ==UserScript==
// @name         Atlassian JIRA - Auto-expand Issue Links
// @description  Automatically expands the Issue Links list. By default, it's 5 and it's hardcoded: https://community.atlassian.com/t5/Jira-questions/Is-it-possible-to-change-the-number-of-Issue-Links-that-display/qaq-p/103076
// @include      https://jira.*
// @include      http://jira.*
// @match        https://jira.*
// @match        http://jira.*
// @version      0.1
// @require      https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js
// @require      https://greasyfork.org/scripts/5392-waitforkeyelements/code/WaitForKeyElements.js?version=115012
// @namespace https://greasyfork.org/users/741506
// ==/UserScript==

function clickWhenItAppears(jNode) {
    var clickEvent = document.createEvent('MouseEvents');
    clickEvent.initEvent('click', true, true);
    jNode[0].dispatchEvent(clickEvent);
}

waitForKeyElements("button[id='show-more-links-link']", clickWhenItAppears);