Spaces:
Running
Running
File size: 1,034 Bytes
cb548ce | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | document.addEventListener('DOMContentLoaded', function() {
// Copy IP functionality
const copyBtn = document.querySelector('.copy-btn');
if (copyBtn) {
copyBtn.addEventListener('click', function() {
navigator.clipboard.writeText('play.firemc.fun');
// Change button text temporarily
const originalText = copyBtn.innerHTML;
copyBtn.innerHTML = '<i data-feather="check" class="w-4 h-4 mr-2"></i> Copied!';
feather.replace();
setTimeout(() => {
copyBtn.innerHTML = originalText;
feather.replace();
}, 2000);
});
}
// Smooth scrolling for anchor links
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
anchor.addEventListener('click', function (e) {
e.preventDefault();
document.querySelector(this.getAttribute('href')).scrollIntoView({
behavior: 'smooth'
});
});
});
}); |