1// Handle SSH copy link
2document.querySelectorAll('.ssh-copy').forEach(function(link) {
3 link.addEventListener('click', function(e) {
4 e.preventDefault();
5 var text = this.getAttribute('data-copy');
6 navigator.clipboard.writeText(text).then(function() {
7 var feedback = document.getElementById('copiedFeedback');
8 feedback.classList.add('show');
9 setTimeout(function() {
10 feedback.classList.remove('show');
11 }, 2000);
12 }).catch(function(err) {
13 console.error('Failed to copy:', err);
14 });
15 });
16});