Bulan: Desember 2025

 

 / 

Sign in

Send Message

My favorites

document.addEventListener("DOMContentLoaded", function() { // Kunci aman: Jangan jalankan script ini sama sekali di halaman dashboard/akun! if (window.location.pathname.includes('/my-account')) { return; } const correctPhone = '6287761588825'; const wrongNumbers = ['087761588825', '6282341777336', '082341777336']; // Ubah link WA yang salah hanya jika di luar dashboard document.querySelectorAll('a[href*="wa.me"], a[href*="api.whatsapp.com"]').forEach(link => { wrongNumbers.forEach(wrongNum => { if (link.href.includes(wrongNum)) { link.href = link.href.replace(wrongNum, correctPhone); } }); }); });document.addEventListener("DOMContentLoaded", function() { // 1. Mencegah script berjalan di halaman Akun/Dashboard pengguna if (window.location.pathname.includes('/my-account')) { return; } const correctPhone = '6287761588825'; // Nomor WA tujuan yang benar const wrongNumbers = ['087761588825', '6282341777336', '082341777336']; // 2. Perbaiki link WhatsApp yang salah (hanya jika mengandung api/wa.me) document.querySelectorAll('a[href*="wa.me"], a[href*="api.whatsapp.com"]').forEach(link => { wrongNumbers.forEach(wrongNum => { if (link.href.includes(wrongNum)) { link.href = link.href.replace(wrongNum, correctPhone); } }); }); // 3. Tombol fallback WhatsApp khusus di halaman detail properti const isListingPage = document.body.classList.contains('single-rz_listing') || window.location.pathname.includes('/listing/'); if (isListingPage) { const waContainer = document.querySelector('.rz-action-whatsapp, .rz-contact-whatsapp'); if (waContainer) { const currentUrl = encodeURIComponent(window.location.href); const defaultMessage = encodeURIComponent("Halo, saya tertarik dengan properti ini: ") + currentUrl; let btn = waContainer.querySelector('a'); if (!btn) { btn = document.createElement('a'); btn.className = 'rz-button rz-button-accent rz-wide'; btn.style.marginTop = '10px'; btn.style.backgroundColor = '#25D366'; btn.style.color = '#fff'; btn.innerText = ' Chat via WhatsApp'; waContainer.appendChild(btn); } btn.href = `https://api.whatsapp.com/send?phone=${correctPhone}&text=${defaultMessage}`; btn.target = '_blank'; } } });