PageSourceSearch

https://www.experiencebypacome.com/assets/contact.js?v=20261004a

js experiencebypacome.com collected 2026-10-04 19:24:56 UTC 2,959 bytes, 74 lines download raw bytes

1(function(){
2  const WHATSAPP_NUMBER = "33650554124";
3  const EMAIL_ADDRESS = "[email protected]";
4  const PAGE_LANG = (document.documentElement.lang === "fr") ? "fr" : (document.documentElement.lang === "es") ? "es" : "en";
5
6  const TEMPLATES = {
7    en: {
8      intro: "Bonjour Pacôme, I would like to plan a private tour of the French Riviera.",
9      name: "Name", email: "Email", hotel: "Hotel", interests: "Interests",
10      closing: "Looking forward to hearing from you!",
11      subject: "Enquiry, private French Riviera tour"
12    },
13    fr: {
14      intro: "Bonjour Pacôme, je souhaiterais organiser une visite privée de la Côte d'Azur.",
15      name: "Nom", email: "Email", hotel: "Hôtel", interests: "Centres d'intérêt",
16      closing: "Au plaisir d'échanger avec vous !",
17      subject: "Demande, visite privée Côte d'Azur"
18    },
19    es: {
20      intro: "Bonjour Pacôme, me gustaría organizar una visita privada por la Riviera Francesa.",
21      name: "Nombre", email: "Email", hotel: "Hotel", interests: "Intereses",
22      closing: "¡Espero su respuesta!",
23      subject: "Consulta, visita privada Riviera Francesa"
24    }
25  };
26
27  const nameInput = document.getElementById("contactName");
28  const emailInput = document.getElementById("contactEmail");
29  const hotelInput = document.getElementById("contactHotel");
30  const interestsInput = document.getElementById("contactInterests");
31  const hint = document.getElementById("contactHint");
32
33  if (!nameInput) return;
34
35  const t = TEMPLATES[PAGE_LANG] || TEMPLATES.en;
36
37  function buildMessage(){
38    let msg = t.intro + "\n\n";
39    if (nameInput.value.trim()) msg += t.name + ": " + nameInput.value.trim() + "\n";
40    msg += t.email + ": " + emailInput.value.trim() + "\n";
41    if (hotelInput.value.trim()) msg += t.hotel + ": " + hotelInput.value.trim() + "\n";
42    if (interestsInput.value.trim()) msg += t.interests + ": " + interestsInput.value.trim() + "\n";
43    msg += "\n" + t.closing;
44    return msg;
45  }
46
47  function validate(){
48    if (!emailInput.value.trim()) {
49      hint.classList.add("visible");
50      emailInput.focus();
51      return false;
52    }
53    hint.classList.remove("visible");
54    return true;
55  }
56
57  document.querySelectorAll(".contact-send-email").forEach(btn => {
58    btn.addEventListener("click", () => {
59      if (!validate()) return;
60      const msg = buildMessage();
61      window.location.href = "mailto:" + EMAIL_ADDRESS + "?subject=" + encodeURIComponent(t.subject) + "&body=" + encodeURIComponent(msg);
62    });
63  });
64
65  document.querySelectorAll(".contact-send-whatsapp").forEach(btn => {
66    btn.addEventListener("click", () => {
67      if (!validate()) return;
68      const msg = buildMessage();
69      window.open("https://wa.me/" + WHATSAPP_NUMBER + "?text=" + encodeURIComponent(msg), "_blank", "noopener");
70    });
71  });
72
73  emailInput.addEventListener("input", () => { if (emailInput.value.trim()) hint.classList.remove("visible"); });
74})();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.