← history for static/js/branch.js
919a9011static/js/branch.js14 lines⬡ raw↓ download
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
function toggleBranch() {
    document.getElementById('branchWrap').classList.toggle('open');
}
document.addEventListener('click', function(e) {
    let w = document.getElementById('branchWrap');
    if (w && !w.contains(e.target)) w.classList.remove('open');
});
function copyCmd(btn) {
    navigator.clipboard.writeText(btn.dataset.cmd).then(function() {
        btn.textContent = 'copied!';
        btn.classList.add('copied');
        setTimeout(function(){ btn.textContent = 'copy'; btn.classList.remove('copied'); }, 1800);
    });
}