79630722

Date: 2025-05-20 15:16:42
Score: 0.5
Natty:
Report link
  1. Add the class whatsapp-link to the button element.
  2. Set the button's URL to #
  3. Add the below javascript code to your website
document.addEventListener("DOMContentLoaded", function() {
  const buttons = document.querySelectorAll('.whatsapp-link');
  buttons.forEach(function(button) {
    button.addEventListener('click', function(e) {
      e.preventDefault(); // Prevent default behavior
      const msg = encodeURIComponent("Hello, thanks for contacting us! -- URL: " + window.location.href);
      const waUrl = 'https://wa.me/6281381534824?text=' + msg;
      window.open(waUrl, '_blank'); // Open WhatsApp chat in new tab
    });
  });
}); <
Reasons:
  • Blacklisted phrase (0.5): thanks
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Tossin