From 1bc10412676ea49840f47a25e9ce0b82debcfdbe Mon Sep 17 00:00:00 2001 From: Medet Date: Fri, 7 Aug 2026 06:37:19 +0000 Subject: [PATCH] =?UTF-8?q?PetMap:=20=D0=BA=D0=BD=D0=BE=D0=BF=D0=BA=D0=B0?= =?UTF-8?q?=20WhatsApp=20=D1=81=D1=80=D0=B0=D0=B7=D1=83=20=D0=BE=D1=82?= =?UTF-8?q?=D0=BA=D1=80=D1=8B=D0=B2=D0=B0=D0=B5=D1=82=20=D1=87=D0=B0=D1=82?= =?UTF-8?q?=20=D1=81=20=D1=81=D0=BE=D0=BE=D0=B1=D1=89=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D0=B5=D0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- petmap.html | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/petmap.html b/petmap.html index 9029595..8b75a0e 100644 --- a/petmap.html +++ b/petmap.html @@ -576,7 +576,7 @@

Описание

- +
@@ -970,7 +970,15 @@ 📞 Контакт:
${item.contact} `; - document.getElementById('preview-call').onclick = () => window.open(`tel:${item.contact}`); + + // WhatsApp кнопка — сразу переход + document.getElementById('preview-whatsapp').onclick = () => { + const phone = item.contact.replace(/[^0-9]/g, ''); // Удаляем всё кроме цифр + const msg = encodeURIComponent(`Здравствуйте! Пишу по объявлению: ${item.title}\n${item.description}`); + const waUrl = `https://wa.me/${phone}?text=${msg}`; + window.open(waUrl, '_blank'); + }; + document.getElementById('preview-share').onclick = () => { const shareData = { title: item.title,