simon / Quartzy request: Expand grant

// ==UserScript==
// @name         Quartzy request: Expand grant
// @namespace    script@simon
// @version      0.6
// @description  Automatically expands request form in Quartzy to show grant field
// @author       Simon, 08/2017
// @match        https://app.quartzy.com/*
// @grant        none
// @require      https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js
// @require      https://gist.github.com/raw/2625891/waitForKeyElements.js
// ==/UserScript==

waitForKeyElements ('.add-more', handleElement);

// click element when found
function handleElement(element) {
    if (location.href.match(/\/requests\/new/gi)) {
        console.log("Expanding request form on " + window.location.href);
        element.click();
    }
}