Contact Us

Sell Your House With

Legacy Home Development Group

What if you could sell your house in just a few days without the stress and uncertainty of listing with an agent? Now you can. Contact us today to find out how.

Location

15 Mona Ln,
Dix Hills, NY 11746

function waitForPopupAndInitAutocomplete() { const observer = new MutationObserver(() => { const popup = document.querySelector('.pum-active'); // Adjust selector if needed if (popup) { console.log('✅ Popup opened:', popup); // Try finding the label const labels = Array.from(popup.querySelectorAll('label')); const targetLabel = labels.find(label => label.textContent.trim().toLowerCase().includes('property address') ); if (!targetLabel) { console.warn('❌ Label "Property Address" not found.'); return; } // Find the associated input using `for` attribute or proximity let addressInput = null; const forAttr = targetLabel.getAttribute('for'); if (forAttr) { addressInput = popup.querySelector(`#${forAttr}`); } else { addressInput = targetLabel.closest('div')?.querySelector('input'); } if (addressInput) { console.log('🏷️ Found input for label "Property Address":', addressInput); const autocomplete = new google.maps.places.Autocomplete(addressInput, { types: ['geocode'], componentRestrictions: { country: 'us' } }); console.log('📍 Google Places autocomplete initialized.'); observer.disconnect(); // Stop observing after success } else { console.warn('❌ Could not find associated input for "Property Address".'); } } }); observer.observe(document.body, { childList: true, subtree: true }); } waitForPopupAndInitAutocomplete();