Scripts

Add CA DRE#

<script>
document.addEventListener("DOMContentLoaded", function () {
  const bioTitles = document.querySelectorAll(".agent-bio.redesign .info-title");

  bioTitles.forEach((title) => {
    if (title.textContent.trim() === "LICENSE NUMBER") {
      title.textContent = "CA DRE#";
    }
  });

  const ctaLabels = document.querySelectorAll(
    ".property-agent-cta-info .details .row-item strong"
  );

  ctaLabels.forEach((label) => {
    if (label.textContent.trim() === "DRE #") {
      label.textContent = "CA DRE#";
    }
  });

  document.querySelectorAll(".contact li").forEach(li => {
  const title = li.querySelector(".contact-title");
  if (!title) return;

    if (title.textContent.trim() === "CA DRE#") {
      li.childNodes.forEach(node => {
        if (node.nodeType === 3 && node.textContent.includes("#")) {
          node.textContent = node.textContent.replace("#", "");
        }
      });
    }
  });
});
</script>

Fix Hint Visionary Details

<script>
document.addEventListener("click", function (e) {
  const hint = e.target.closest(".neighborhood-overview-grid__hint.lp-icon.lp-icon--info");

  // If user clicked a hint icon: toggle only that popup (and close others)
  if (hint) {
    const popup = hint.querySelector(".neighborhood-overview-grid__pop-up");
    if (!popup) return;

    const isOpen = popup.getAttribute("data-open") === "1";

    document.querySelectorAll(".neighborhood-overview-grid__pop-up").forEach((p) => {
      p.setAttribute("data-open", "0");
      p.style.opacity = "0";
      p.style.visibility = "hidden";
    });

    if (!isOpen) {
      popup.setAttribute("data-open", "1");
      popup.style.opacity = "1";
      popup.style.visibility = "visible";
    }

    return;
  }

  // Otherwise clicked anywhere else: close all popups
  document.querySelectorAll(".neighborhood-overview-grid__pop-up").forEach((popup) => {
    popup.setAttribute("data-open", "0");
    popup.style.opacity = "0";
    popup.style.visibility = "hidden";
  });
});
</script>

Add O: and M:

<script>
document.addEventListener("DOMContentLoaded", function () {
  const containers = [
    document.getElementById("global-footer"),
    document.getElementById("modal-global-contact-us"),
  ];

  containers.forEach((container) => {
    if (!container) return;

    const mobileLink = container.querySelector('a[href="tel:(412) 538-8405"]');
    const officeLink = container.querySelector('a[href="tel:(412) 366-1600"]');

    if (mobileLink && !mobileLink.textContent.trim().startsWith("M:")) {
      mobileLink.textContent = "M: " + mobileLink.textContent.trim();
    }

    if (officeLink && !officeLink.textContent.trim().startsWith("O:")) {
      officeLink.textContent = "O: " + officeLink.textContent.trim();
    }
  });

  document
    .querySelectorAll('.property-agent-cta-info a[href^="tel:"]')
    .forEach((link) => {
      const text = link.textContent.trim();
      if (!text) return;

      if (!text.startsWith("M:") && !text.startsWith("O:")) {
        link.textContent = "M: " + text;
      }
    });
});
</script>