What's the difference between using
if (document.domain.toLowerCase().indexOf("domainName") != -1)
and
if(window.location.href.match(/:\/\/(.[^/]+)/)[1].toLowerCase().indexOf("domainName") != -1)
and
if(window.location.hostname.toLowerCase().indexOf("domainName") != -1)
I'm just trying to match on a certain domainName and want to use the best approach.