I am working with a website builder that has several limitations. I am trying to insert html into a specific part of the page from the footer. I already have the insert part down, that was easy enough. What I am stuck on is I only want it to fire when it matches a specific domain.
The code breaks parts of the builder tool I am using so I need to make sure it does not Run unless it is the published live site. Here is what I came up with (not my first attempt)
<script type="text/javascript">
var cururl = window.location.host;
if (cururl == "domain.com" || cururl == "www.doamin.com")
{
Some code...
}
</script>
Aucun commentaire:
Enregistrer un commentaire