File tree Expand file tree Collapse file tree 2 files changed +27
-1
lines changed Expand file tree Collapse file tree 2 files changed +27
-1
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,22 @@ export default function Index() {
14
14
// Convert the response to text
15
15
. then ( ( response ) => response . text ( ) )
16
16
// Set the HTML
17
- . then ( ( html ) => setHtml ( html ) ) ;
17
+ . then ( ( html ) => {
18
+ setHtml ( html ) ;
19
+
20
+ // Add the crisp chat script after the dynamic html has been loaded
21
+ // @ts -ignore
22
+ window . $crisp = [ ] ;
23
+ // @ts -ignore
24
+ window . CRISP_WEBSITE_ID = 'dff22f8a-0d73-4a83-91be-1f448410c464' ;
25
+ ( function ( ) {
26
+ let d = document ;
27
+ let s = d . createElement ( 'script' ) ;
28
+ s . src = 'https://client.crisp.chat/l.js' ;
29
+ s . async = true ;
30
+ d . getElementsByTagName ( 'head' ) [ 0 ] . appendChild ( s ) ;
31
+ } ) ( ) ;
32
+ } ) ;
18
33
} , [ ] ) ;
19
34
20
35
// Draw the arrows after any changes to the HTML
Original file line number Diff line number Diff line change 47
47
src ="https://plausible.io/js/plausible.js "
48
48
> </ script >
49
49
< script defer src ="./landing-page/bundle.js "> </ script >
50
+ < script type ="text/javascript ">
51
+ window . $crisp = [ ] ;
52
+ window . CRISP_WEBSITE_ID = 'dff22f8a-0d73-4a83-91be-1f448410c464' ;
53
+ ( function ( ) {
54
+ d = document ;
55
+ s = d . createElement ( 'script' ) ;
56
+ s . src = 'https://client.crisp.chat/l.js' ;
57
+ s . async = 1 ;
58
+ d . getElementsByTagName ( 'head' ) [ 0 ] . appendChild ( s ) ;
59
+ } ) ( ) ;
60
+ </ script >
50
61
</ head >
51
62
52
63
< body >
You can’t perform that action at this time.
0 commit comments