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