// ==UserScript== // @name Atlassian JIRA - Auto-expand older comments // @description Automatically expands the older comments accordion in JIRA so you see all comments by default. Workaround to jira.comment.collapsing.minimum.hidden. Aids in searching page. // @include https://jira.* // @include http://jira.* // @exclude *?jql=* // @exclude *&jql=* // @version 0.4 // @namespace https://greasyfork.org/users/77886 // @require http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js // @require https://greasyfork.org/scripts/5392-waitforkeyelements/code/WaitForKeyElements.js?version=115012 // @downloadURL https://update.greasyfork.icu/scripts/387295/Atlassian%20JIRA%20-%20Auto-expand%20older%20comments.user.js // @updateURL https://update.greasyfork.icu/scripts/387295/Atlassian%20JIRA%20-%20Auto-expand%20older%20comments.meta.js // ==/UserScript== function clickWhenItAppears (jNode) { var clickEvent = document.createEvent ('MouseEvents'); clickEvent.initEvent ('click', true, true); jNode[0].dispatchEvent (clickEvent); } bWaitOnce = true; // 12 older comments waitForKeyElements ( "a[class='collapsed-comments']", clickWhenItAppears );