User:Wottem/waze.js View history

imported>Wottem
No edit summary
imported>Wottem
(Replaced content with "$(this).closest('ul').find('> li.tree-parent').attr('aria-expanded', function (i, attr) { return attr == 'true' ? 'false' : 'true' }); $(".zippy").attr("aria-expanded...")
 
Line 1: Line 1:
        function dH() {
$(this).closest('ul').find('> li.tree-parent').attr('aria-expanded', function (i, attr) {
                this.o = window.sc_scope || document
    return attr == 'true' ? 'false' : 'true'
            }
});
            dH.prototype.init = function() {
 
                for (var a = this.o.querySelectorAll(".zippy"), b = null, c = 0; c < a.length; c++) {
$(".zippy").attr("aria-expanded","true").toggleClass("expand");
                    var e = c + 1
                      , f = a[c]
                      , h = f.nextElementSibling;
                    if (h && (h instanceof HTMLDivElement || h instanceof HTMLParagraphElement)) {
                        var k = document.createElement("DIV");
                        z(k, "zippy-container", !0);
                        f.parentNode.replaceChild(k, f);
                        k.appendChild(f);
                        var l = document.createElement("DIV");
                        l.className = "zippy-overflow";
                        h.parentNode.insertBefore(l, h);
                        l.appendChild(h);
                        z(f, "index" + e, !0);
                        z(h, "zippy-content", !0);
                        eH(f) ? (z(f, "goog-zippy-expanded", !0),
                        h.removeAttribute("aria-hidden"),
                        f.setAttribute("aria-expanded", !0),
                        h.style.marginTop = 0,
                        !b && f.name && fH(E().query + window.location.hash, f.name) && (b = f)) : (gH(h),
                        h.style.display = "none",
                        h.style.height = h.style.padding = 0,
                        h.setAttribute("aria-hidden", !0),
                        f.setAttribute("aria-expanded", !1),
                        z(h, "zippy-hidden", !0),
                        z(f, "goog-zippy-collapsed", !0));
                        window.addEventListener("resize", function(n) {
                            tf(n, "zippy-hidden") && hH(n, "", function() {
                                gH(n)
                            }
                            .bind(this))
                        }
                        .bind(this, h));
                        iH(l, k);
                        f.tabIndex = 0;
                        f.setAttribute("role", "button");
                        f.addEventListener("click", this.ha.bind(this, h, f));
                        f.addEventListener("keydown", this.ma.bind(this, h, f));
                        f.addEventListener("focus", jH);
                        f.addEventListener("blur", jH);
                        f.setAttribute("data-stats-ve", 2);
                        f.setAttribute("data-stats-imp", "");
                        f.setAttribute("data-stats-idx", e + "," + a.length);
                        f.setAttribute("data-stats-ignore", "");
                        (e = f.getAttribute("id")) || (e = f.getAttribute("name"));
                        e && f.setAttribute("data-stats-id", e);
                        kH(this, f, h)
                    }
                }
                b && b.scrollIntoView()
            }
            ;
            function hH(a, b, c) {
                a.style.transition != b ? (a.style.transition = b,
                window.setTimeout(c, 0)) : c()
            }
            function eH(a) {
                var b = E().query_params.find(function(c) {
                    return "expand_all_zippies" == c.key
                });
                return (b ? "true" == b.value : !1) || tf(a, "zippy-expand") || !!a.name && fH(E().query + window.location.hash, a.name)
            }
            function fH(a, b) {
                return (new RegExp("[?#&,]" + vf(b) + "(?:[#&,]|$)")).test(a)
            }
            function gH(a) {
                a.style.marginTop = -a.offsetHeight + "px"
            }
            dH.prototype.ha = function(a, b) {
                z(a, "zippy-hidden");
                z(b, "goog-zippy-expanded");
                z(b, "goog-zippy-collapsed");
                var c = b.parentElement;
                if (tf(b, "goog-zippy-expanded")) {
                    a.removeAttribute("aria-hidden");
                    b.setAttribute("aria-expanded", !0);
                    var e = 2;
                    lH(a);
                    mH(c)
                } else
                    a.setAttribute("aria-hidden", !0),
                    b.setAttribute("aria-expanded", !1),
                    e = 3,
                    a.addEventListener("transitionend", nH),
                    mH(c),
                    hH(a, "margin-top .218s ease-out", function() {
                        gH(a)
                    }
                    .bind(this));
                window.sc_trackStatsEventByElement(b, 2, e)
            }
            ;
            dH.prototype.ma = function(a, b, c) {
                switch (c.which) {
                case 13:
                case 32:
                    c.preventDefault(),
                    this.ha(a, b)
                }
            }
            ;
            function lH(a) {
                oH(a);
                a.style.height = a.style.padding = "";
                a.style.display = "";
                a.removeEventListener("transitionend", nH);
                hH(a, "margin-top .218s ease-out", function() {
                    a.style.overflow = "auto";
                    a.style.marginTop = 0
                });
                fg(document, "imgLazyLoad")
            }
            function oH(a) {
                a = a.getElementsByClassName("goog-zippy-collapsed");
                for (var b = 0; b < a.length; b++) {
                    var c = a[b].parentElement.nextElementSibling;
                    c && (c = c.firstChild) && gH(c)
                }
            }
            function kH(a, b, c) {
                if (b.name)
                    for (var e = a.o.getElementsByTagName("a"), f = 0; f < e.length; f++) {
                        var h = e[f];
                        fH(h.href, b.name) && h.addEventListener("click", a.ka.bind(a, b, c))
                    }
            }
            dH.prototype.ka = function(a, b) {
                tf(a, "goog-zippy-expanded") || (z(b, "zippy-hidden", !1),
                z(a, "goog-zippy-expanded", !0),
                z(a, "goog-zippy-collapsed", !1),
                lH(b),
                window.sc_trackStatsEventByElement(a, 2, 2))
            }
            ;
            window.sc_initZippy = function() {
                (new dH).init()
            }
            ;
            function nH(a) {
                a.target.style.display = "none"
            }
            function iH(a, b) {
                var c = a.parentElement
                  , e = !1;
                tf(c, "zippy-wrapper") ? (a = c.nextElementSibling) && tf(a, "zippy-wrapper") || (e = !0) : (a = a.nextElementSibling) && tf(a, "zippy") || (e = !0);
                e && z(b, "zippy-last", !0)
            }
            function mH(a) {
                a && tf(a, "zippy-last") && z(a, "zippy-last-focus")
            }
            function jH(a) {
                z(a.target.parentElement, "zippy-focus")
            }
            ;

Latest revision as of 23:10, 8 September 2020

$(this).closest('ul').find('> li.tree-parent').attr('aria-expanded', function (i, attr) {
    return attr == 'true' ? 'false' : 'true'
});

$(".zippy").attr("aria-expanded","true").toggleClass("expand");