var loc = document.location.host; var fr = document.querySelector("iframe").src; if(/https*:\/\//.test(fr) && !(fr.includes(loc)) ) alert('Сторонний Iframe');