Issues with Tampermonkey script for Gmail after update
<p>I use a Tampermonkey script in Chrome that increases the maximum length of the "Move to" and "Label as" menus in Gmail. When Tampermonkey auto-updated to the latest major version a few months ago, the script stopped working. Our development manager helped me with the script a couple of years ago and since I'm an amatuer developer I haven't had much luck figuring out why it isn't working anymore.</p>

<pre><code>// ==UserScript==
// @name            Gmail CSS updates - menus
// @author          Tyler Lesmeister
// @namespace       http://www.onsharp.com
// @description     Increases the height of Move to/Labels menus in Gmail
// @version         0.3
// @released        2014-03-20
// @compatible      Greasemonkey
// @match           https://mail.google.com/mail/u/*
// @require         https://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js
// ==/UserScript==

jq = {};
fix = {};

(function($){
    jq = $;

    // fix css and ui
    fix.go = function(){

        // update the css/styles of things we dont like
        $('body').append(" &lt;style id='monkey'&gt; " +
                         " .J-M-Jz { max-height: none !important; }.J-M {max-height: 800px !important; } &lt;/style&gt;" );

    };    

})(jQuery.noConflict());

document.addEventListener("DOMContentLoaded", function(event) {
    //console.log("DOM fully loaded and parsed");
    if(window.location == window.parent.location) {
        if (document.getElementById("loading")) {
            fix.go();
        }
    }
});



;(function ($, window) {
    var intervals = {};
    var removeListener = function(selector) {
        if (intervals[selector]) {
            window.clearInterval(intervals[selector]);
            intervals[selector] = null;
        }
    };
    var found = 'waitUntilExists.found';

    /**
 * @function
 * @property {object} jQuery plugin which runs handler function once specified
 *           element is inserted into the DOM
 * @param {function|string} handler 
 *            A function to execute at the time when the element is inserted or 
 *            string "remove" to remove the listener from the given selector
 * @param {bool} shouldRunHandlerOnce 
 *            Optional: if true, handler is unbound after its first invocation
 * @example jQuery(selector).waitUntilExists(function);
 */

    $.fn.waitUntilExists = function(handler, shouldRunHandlerOnce, isChild) {

        var selector = this.selector;
        var $this = $(selector);
        var $elements = $this.not(function() { return $(this).data(found); });

        if (handler === 'remove') {
            // Hijack and remove interval immediately if the code requests
            removeListener(selector);
        }
        else {
            // Run the handler on all found elements and mark as found
            $elements.each(handler).data(found, true);

            if (shouldRunHandlerOnce &amp;&amp; $this.length) {
                // Element was found, implying the handler already ran for all 
                // matched elements
                removeListener(selector);
            }
            else if (!isChild) {
                // If this is a recurring search or if the target has not yet been 
                // found, create an interval to continue searching for the target
                intervals[selector] = window.setInterval(function () {
                    $this.waitUntilExists(handler, shouldRunHandlerOnce, true);
                }, 500);
            }
                }
        return $this;
    };

}(jQuery, window));
</code></pre>

<p>If I inspect the element in Chrome to open the dev console I can see that Tampermonkey isn't injecting the new values. If I manually change the values in the dev console I am able to produce the results that I'm looking for. See screenshots at the below Imgur album (apparently I can't post any images or include more than two links because I need at least 10 reputation...)</p>

<p><a href="http://imgur.com/a/r5jeu" rel="nofollow">http://imgur.com/a/r5jeu</a></p>

<p>So as you can see, I'm able to modify the length of the menus through the console just fine. Tampermonkey isn't doing it and I'm guessing it's because something in my script is outdated. Any help would be much appreciated.</p>