Skip to content

Commit

Permalink
switch to recommended loading of Touchpoints script
Browse files Browse the repository at this point in the history
  • Loading branch information
afeld committed Apr 15, 2021
1 parent a3c4bb6 commit 4e8875c
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions _includes/scripts.html
Expand Up @@ -40,7 +40,7 @@

var script = document.createElement("script");
script.type = "text/javascript";
script.src = "//search.usa.gov/javascripts/remote.loader.js";
script.src = "https://search.usa.gov/javascripts/remote.loader.js";
document.getElementsByTagName("head")[0].appendChild(script);

//]]>
Expand All @@ -49,17 +49,5 @@


{% if site.touchpoints_form_id %}
<script type="text/javascript">
//<![CDATA[
var touchpoints_config = { siteHandle:"{{ site.touchpoints_form_id }}" };

var script = document.createElement("script");
script.type = "text/javascript";
script.src = `https://touchpoints.app.cloud.gov/touchpoints/${touchpoints_config.siteHandle}/js`;
script.async = true;
document.getElementsByTagName("head")[0].appendChild(script);

//]]>
</script>

<script src="https://touchpoints.app.cloud.gov/touchpoints/{{ site.touchpoints_form_id }}.js" async></script>
{% endif %}

0 comments on commit 4e8875c

Please sign in to comment.