custom.js
... ...
@@ -1,15 +1,19 @@
1
-var script = document.createElement('script');
2
-script.type = 'text/javascript';
3
-script.async = true;
4
-script.src = "https://cdn.jsdelivr.net/ghost/signup-form@~0.1/umd/signup-form.min.js";
1
+var sign_up_form = document.getElementById("tea-leaves-sign-up-form");
5 2
6
-script.dataset['background-color']="#ffffff"
7
-script.dataset['text-color']="#000000"
8
-script.dataset['button-color']="#197eff"
9
-script.dataset['text-color-button']="#ffffff"
10
-script.dataset['title']="Tea Leaves"
11
-script.dataset['icon']="https://gaiwan.co/content/images/size/w192h192/size/w256h256/2024/01/favicon.ico"
12
-script.dataset['description']="Learn about Clojure, ClojureScript, design, MVP's, and business."
13
-script.dataset['site']="https://gaiwan.co/"
3
+when(sign_up_form) {
4
+ var script = document.createElement('script');
5
+ script.type = 'text/javascript';
6
+ script.async = true;
7
+ script.src = "https://cdn.jsdelivr.net/ghost/signup-form@~0.1/umd/signup-form.min.js";
14 8
15
-document.getElementById("tea-leaves-sign-up-form").appendChild(script);
9
+ script.dataset['background-color']="#ffffff"
10
+ script.dataset['text-color']="#000000"
11
+ script.dataset['button-color']="#197eff"
12
+ script.dataset['text-color-button']="#ffffff"
13
+ script.dataset['title']="Tea Leaves"
14
+ script.dataset['icon']="https://gaiwan.co/content/images/size/w192h192/size/w256h256/2024/01/favicon.ico"
15
+ script.dataset['description']="Learn about Clojure, ClojureScript, design, MVP's, and business."
16
+ script.dataset['site']="https://gaiwan.co/"
17
+
18
+ sign_up_form.appendChild(script);
19
+}