Spaces:
Running

frostbytemc / script.js
Minesphere's picture
Change site name is CrystenMC and fix all issues
cb548ce verified
Raw History Blame Contribute Delete
1.03 kB
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'
});
});
});
});