diff options
| author | Xe Iaso <me@xeiaso.net> | 2024-02-03 20:05:06 -0500 |
|---|---|---|
| committer | Xe Iaso <me@xeiaso.net> | 2024-02-03 20:05:06 -0500 |
| commit | 944fbf678403c77e158accd66363accbbe6d6eb4 (patch) | |
| tree | 26939db77c72b500acf9eb0b0b8c1bf2653b1f9f /lume/src/_components | |
| parent | 26a17587cf5ecc5a7964c18ffc3871c79ffdb2d8 (diff) | |
| download | xesite-944fbf678403c77e158accd66363accbbe6d6eb4.tar.xz xesite-944fbf678403c77e158accd66363accbbe6d6eb4.zip | |
components/ads: disable ads in development
Fun fact, adding a </script> in a string in an inline <script> tag
causes the browser to stop parsing JS. You need to make it
<\/script> instead.
Signed-off-by: Xe Iaso <me@xeiaso.net>
Diffstat (limited to 'lume/src/_components')
| -rw-r--r-- | lume/src/_components/ads.njk | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lume/src/_components/ads.njk b/lume/src/_components/ads.njk index bc4c185..75152e5 100644 --- a/lume/src/_components/ads.njk +++ b/lume/src/_components/ads.njk @@ -1,2 +1,7 @@ -<script async src="https://media.ethicalads.io/media/client/ethicalads.min.js"></script> -<div data-ea-publisher="christinewebsite" data-ea-type="text" data-ea-style="fixedfooter"></div> +<script> + if (!window.location.hostname.includes(".shark-harmonic.ts.net")) { + document.write("<script async src=\"https://media.ethicalads.io/media/client/ethicalads.min.js\"><\/script>"); + } +</script> + +<div data-ea-publisher="christinewebsite" data-ea-type="text" data-ea-style="fixedfooter"></div>
\ No newline at end of file |
