37231-vm/assets/js/main.js
Flatlogic Bot f01b633d27 Alfa
2026-01-02 00:00:49 +00:00

23 lines
812 B
JavaScript

document.addEventListener('DOMContentLoaded', function() {
const imageWrappers = document.querySelectorAll('.post-image-wrapper');
imageWrappers.forEach(wrapper => {
wrapper.addEventListener('dblclick', function() {
// Create heart icon if it doesn't exist
let heart = wrapper.querySelector('.like-heart');
if (!heart) {
heart = document.createElement('div');
heart.className = 'like-heart';
heart.innerHTML = '❤'; // Heart symbol
wrapper.appendChild(heart);
}
// Trigger the animation
heart.classList.add('show');
setTimeout(() => {
heart.classList.remove('show');
}, 800);
});
});
});