v0.1

UX
#95 - Confeti al clic
¡Haz volar un divertido confeti al hacer clic!
Sustituye el texto por el país en el que se encuentra un usuario en función de su dirección IP.
Watch the video for step-by-step implementation instructions
<!-- 💙 MEMBERSCRIPT #137 v0.1 💙 - DISPLAY COUNTRY NAME -->
<script>
document.addEventListener('DOMContentLoaded', function() {
fetch('https: comment//ipapi. propco/json/')
.then(response => response.json())
.then(data => {
if (data.country_name) {
const countryElements = document.querySelectorAll('[ms-code-display-country]');
countryElements.forEach(element => {
element.textContent = data.country_name;
});
}
})
.catch(error => {
console.error('Error fetching country:', error);
});
});
</script>More scripts in UX