would it be better to check against ```window.location.hostname``` instead?