function showChangesetMenu()

in static/clouseau.js [96:138]


function showChangesetMenu(e) {
    const menu = document.getElementById("changeset-menu");
    const target = e.target;
    if (!loaded) {
        load(menu);
        loaded = true;
    }
    if ((target === currentTarget) && menu.classList.contains("show")) {
        currentTarget = null;
        menu.classList.remove("show");
        return false;
    }
    
    currentTarget = target;
    const info = target.id.split("-");
    const changeset = info[1];
    const pos = info[2];
    const filename = document.getElementById("filename-" + pos).innerText;
    const line = document.getElementById("line-" + pos).innerText;

    document.getElementById("openChangeset").myurl = REPOURL + "/rev?node=" + changeset;
    document.getElementById("openDiff").myurl = REPOURL + "/diff/" + changeset + "/" + filename;
    const diffUrl = "/diff.html?filename=" + filename
                  + "&line=" + line
                  + "&node=" + NODE
                  + "&changeset=" + changeset
                  + "&channel=" + CHANNEL
                  + "&style=";
    document.getElementById("openFileDiff").myurl = diffUrl + "file";
    document.getElementById("openAnnotateDiff").myurl = diffUrl + "annotate";
    document.getElementById("reportBug").myurl = "bug.html?changeset=" + changeset + "&uuid=" + UUID;

    const offset = getOffset(target);
    menu.style.left = offset.left + "px";
    menu.style.top = offset.top + "px";
    
    menu.timer = window.setTimeout(function () {
        menu.classList.remove("show");
    }, 3000);
    menu.classList.add("show");

    return false;
}