Unfold Jira quickfilters

Unfolds Jira quickfilters in Kanban view

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(У мене вже є менеджер скриптів, дайте мені встановити його!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         Unfold Jira quickfilters
// @namespace    http://tampermonkey.net/
// @version      0.4
// @description  Unfolds Jira quickfilters in Kanban view
// @author       Alan Borowy
// @match        https://*.atlassian.net/jira/software/c/projects/*
// @icon         https://www.google.com/s2/favicons?domain=bitbucket.org
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    function handleCanvas(quickFiltersButton) {
        quickFiltersButton.click()
    }

    // @damd, https://stackoverflow.com/a/35211286
    // set up the mutation observer
    var observer = new MutationObserver(function (mutations, me) {
        // `mutations` is an array of mutations that occurred
        // `me` is the MutationObserver instance
        var quickFiltersButton = document.querySelector('#ghx-quick-filters .jdgrw0-0.bsBhhk button');
        if (quickFiltersButton) {
            handleCanvas(quickFiltersButton);
            me.disconnect(); // stop observing
            return;
        }
    });

    // start observing
    observer.observe(document, {
        childList: true,
        subtree: true
    });
})();