Skip to content

Commit

Permalink
dynamically load ad script by hostname
Browse files Browse the repository at this point in the history
  • Loading branch information
ddennedy committed Sep 9, 2023
1 parent f5d22d0 commit 7e8a4bf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
}
if (location.hostname.endsWith("shotcut.org")) {
loadScript("//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-1305424236533187", true);
} else if (location.hostname.endsWith("shotcut.com")) {
loadScript("//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-1305424236533187", true);
} else if (location.hostname.endsWith("shotcutapp.com")) {
loadScript("//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-1305424236533187", true);
}
</script>
<!--
Expand Down

0 comments on commit 7e8a4bf

Please sign in to comment.