Someone can help me because I can only add one domain, and when I try to put more than 1 URL does not work. If anyone can help me I'm grateful!
if((window.location.href).indexOf('DOMÍNIO') >= 0){
}else{ // Como faço para adicionar mais de um DOMÍNIO ?
}
Edit:
I made it this way and the alert worked only on domain 1, when I open the second site the alert appears, can you help me because domain 2 is not being recognized? The following is the model below:
var listaDominios = ["http://www.dominio1.com", "http://www.dominio2.com"];
var dominioValido = listaDominios.find(function(dominio){
return window.location.href.indexOf(dominio) > -1;
});
if(dominioValido) {
}else{
alert('Site não autorizado');
}