Fiz todos os passos da aula mas simplesmente ignora o arquivo mailcheck.
Código do mailcheck-config
var campoEmail = document.querySelector('#email');
var sugestao = document.querySelector('#sugestao');
var domains = ['gmail.com', 'aol.com'];
var secondLevelDomains = ['hotmail']
var topLevelDomains = ["com", "net", "org"];
var superStringDistance = function(string1, string2) {
// a string distance algorithm of your choosing
}
campoEmail.addEventListener('blur', function() {
Mailcheck.run({
email: campoEmail.value,
domains: domains, // optional
topLevelDomains: topLevelDomains, // optional
secondLevelDomains: secondLevelDomains, // optional
distanceFunction: superStringDistance, // optional
suggested: function(suggestion) {
console.log(suggestion.full);
}
});
});
Chamando no final do html
</div> <!--fim .dialogNewsletter-->
<script src="js/carousel.js"></script>
<script src="js/inert.js"></script>
<script src="js/dialog.js"></script>
<script src="js/validacao.js"></script>
<script src="js/mailcheck.js"></script>
<script src="js/mailcheck-config.js"></script>
</body>
</html>
Trecho do html
<div class="contatoCampo contatoCampo--erro">
<label for="email">Email: </label>
<input type="email" id="email" class="contatoCampo--validouErro" placeholder="Email.." required>
<span id="sugestao" class="contatoCampo-msg contatoCampo-msg--erro"> </span>
</div>