admin管理员组

文章数量:1221786

Question is in the title. It would be handy feature in pull requests, when adjusting branch policies or when you're searching for a specific branch.

Here’s my current workaround:

javascript: (function(){
    if(!window.location.hostname.endsWith('.visualstudio'))
    {
        alert("You must be on Azure DevOps to minimize the folders.");
        return;
    }
    
    let targets = Array
        .from(document.querySelectorAll('.cursor-pointer.ms-Icon--ChevronDownMed'))
        .reverse();

    let delay = 0; //delay required to await collapse??
    for(let t = 0; t < targets.length; t++)
    {
        window.setTimeout(function(){
            targets[t].click();
        }, delay);
        delay += 50; 
    }
})();

When you minify that JS above, you can add it as a link to your browser bookmarks. The button from your bookmarks will collapse folders, in the current view on Azure DevOps. But I honestly would prefer a maintenance-free solution... Further inputs would be very welcome.

本文标签: How do i collapse all folders in Azure DevOps (web)Stack Overflow