MEK Learning CirclesMEK Learning Circles

Planning Your Summer of Success with MLC for 7th Grade The summer is an essential time for students to grow: both academically and physically. While many parents will think of the summer as a time to recharge for the next academic year, the truth comes down...

Planning Your Summer of Success with MLC for 6th Grade The summer is an essential time for students to grow: both academically and physically. While many parents will think of the summer as a time to recharge for the next academic year, the truth comes down...

Planning Your Summer of Success with MLC for 5th Grade The summer is an essential time for students to grow: both academically and physically. While many parents will think of the summer as a time to recharge for the next academic year, the truth comes down...

Planning Your Summer of Success with MLC for 4th Grade The summer is an essential time for students to grow: both academically and physically. While many parents will think of the summer as a time to recharge for the next academic year, the truth comes down...

Planning Your Summer of Success with MLC for 3rd Grade The summer is an essential time for students to grow: both academically and physically. While many parents will think of the summer as a time to recharge for the next academic year, the truth comes down...

Planning Your Summer of Success with MLC The summer is an essential time for students to grow: both academically and physically. While many parents will think of the summer as a time to recharge for the next academic year, the truth comes down to simple numbers. The...

var interval = setInterval(findForm, 100); var startTime = new Date().getTime(); function formatPhoneNumber(value) { if (!value) return value; const phoneNumber = value.replace("+1", "").replace(/[^\d]/g, ''); const phoneNumberLength = phoneNumber.length; if (phoneNumberLength < 4) return phoneNumber; if (phoneNumberLength < 7) { return `+1 (${phoneNumber.slice(0, 3)}) ${phoneNumber.slice(3)}`; } return `+1 (${phoneNumber.slice(0, 3)}) ${phoneNumber.slice( 3, 6 )}-${phoneNumber.slice(6, 10)}`; } function validatePhoneNumber(input_str) { var re = /^\(?(\d{3})\)?[- ]?(\d{3})[- ]?(\d{4})$/; return re.test(input_str); } function convertPhoneToUSA(form) { var phoneNumberInput = form.querySelector('[data-name="phone_number"]'); phoneNumberInput.addEventListener('input', function(){ this.value = formatPhoneNumber(this.value); }) } function findForm() { var form = document.getElementsByClassName('_form_84')[0] || document.getElementsByClassName('_form_96')[0] || document.getElementsByClassName('_form_88')[0]; if (form) { convertPhoneToUSA(form); clearInterval(interval) } else { if(new Date().getTime() - startTime > 6000){ console.log("form not found"); clearInterval(interval); return; } } }