17 lines
669 B
JavaScript
17 lines
669 B
JavaScript
// Custom JavaScript will go here
|
|
|
|
document.addEventListener('DOMContentLoaded', function() {
|
|
const copyButton = document.getElementById('copy-button');
|
|
if (copyButton) {
|
|
copyButton.addEventListener('click', function() {
|
|
const portalLinkInput = document.getElementById('portal-link');
|
|
portalLinkInput.select();
|
|
document.execCommand('copy');
|
|
// Optional: Provide feedback to the user
|
|
copyButton.innerHTML = '<i class="bi bi-check-lg"></i>';
|
|
setTimeout(function() {
|
|
copyButton.innerHTML = '<i class="bi bi-clipboard"></i>';
|
|
}, 2000);
|
|
});
|
|
}
|
|
}); |