File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,15 @@ Google Analytics. This could be done with the following theme:
21
21
``` tsx
22
22
import { Application , DefaultTheme , PageEvent , JSX } from " typedoc" ;
23
23
24
+ const script = `
25
+ (function() {
26
+ var _owa = document.createElement('script'); _owa.type = 'text/javascript';
27
+ _owa.async = true; _owa.src = '${site }' + '/modules/base/js/owa.tracker-combined-min.js';
28
+ var _owa_s = document.getElementsByTagName('script')[0]; _owa_s.parentNode.insertBefore(_owa,
29
+ _owa_s);
30
+ }());
31
+ ` .trim ();
32
+
24
33
class MyThemeContext extends DefaultThemeRenderContext {
25
34
// Important: If you use `this`, this function MUST be bound! Template functions are free
26
35
// to destructure the context object to only grab what they care about.
@@ -30,15 +39,6 @@ class MyThemeContext extends DefaultThemeRenderContext {
30
39
31
40
const site = this .options .getValue (" gaId" );
32
41
33
- const script = `
34
- (function() {
35
- var _owa = document.createElement('script'); _owa.type = 'text/javascript';
36
- _owa.async = true; _owa.src = '${site }' + '/modules/base/js/owa.tracker-combined-min.js';
37
- var _owa_s = document.getElementsByTagName('script')[0]; _owa_s.parentNode.insertBefore(_owa,
38
- _owa_s);
39
- }());
40
- ` .trim ();
41
-
42
42
return (
43
43
<script >
44
44
<JSX.Raw html = { script } />
You can’t perform that action at this time.
0 commit comments