diff options
Diffstat (limited to 'templates/repo/clone_script.tmpl')
-rw-r--r-- | templates/repo/clone_script.tmpl | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/templates/repo/clone_script.tmpl b/templates/repo/clone_script.tmpl index 21e78727ff..0797b400d8 100644 --- a/templates/repo/clone_script.tmpl +++ b/templates/repo/clone_script.tmpl @@ -13,9 +13,13 @@ if (httpsBtn) { httpsBtn.textContent = window.origin.split(':')[0].toUpperCase(); - httpsBtn.classList[!isSSH ? 'add' : 'remove']('primary'); + httpsBtn.classList.toggle('primary', !isSSH); + httpsBtn.classList.toggle('basic', isSSH); + } + if (sshBtn) { + sshBtn.classList.toggle('primary', isSSH); + sshBtn.classList.toggle('basic', !isSSH); } - if (sshBtn) sshBtn.classList[isSSH ? 'add' : 'remove']('primary'); const btn = isSSH ? sshBtn : httpsBtn; if (!btn) return; |