File "url-fields.js"
Full Path: /home/siazco/grocery.siazco.se/wp-content/plugins/mailchimp-for-wp/includes/forms/views/js/url-fields.js
File size: 348 bytes
MIME-type: text/plain
Charset: utf-8
function maybePrefixUrlField () {
const value = this.value.trim()
if (value !== '' && value.indexOf('http') !== 0) {
this.value = 'http://' + value
}
}
const urlFields = document.querySelectorAll('.mc4wp-form input[type="url"]')
for (let j = 0; j < urlFields.length; j++) {
urlFields[j].addEventListener('blur', maybePrefixUrlField)
}