Skip to content

Commit 165b93b

Browse files
Fix Indentation of const script = ... (#2254)
1 parent 44badfd commit 165b93b

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

internal-docs/custom-themes.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,15 @@ Google Analytics. This could be done with the following theme:
2121
```tsx
2222
import { Application, DefaultTheme, PageEvent, JSX } from "typedoc";
2323

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+
2433
class MyThemeContext extends DefaultThemeRenderContext {
2534
// Important: If you use `this`, this function MUST be bound! Template functions are free
2635
// to destructure the context object to only grab what they care about.
@@ -30,15 +39,6 @@ class MyThemeContext extends DefaultThemeRenderContext {
3039

3140
const site = this.options.getValue("gaId");
3241

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-
4242
return (
4343
<script>
4444
<JSX.Raw html={script} />

0 commit comments

Comments
 (0)