1 | import htmlgenerator as hg |
2 |
|
3 |
|
4 | def run(data=None): |
5 | contents = [ |
6 | # Theme switching script |
7 | hg.SCRIPT(type="text/javascript", src="/static/js/theme.js"), |
8 | # Banner scroll script |
9 | hg.SCRIPT( |
10 | type="text/javascript", |
11 | src="/static/js/banner_scroll.js", |
12 | defer=True, |
13 | ), |
14 | # Hyperlink anchors |
15 | hg.SCRIPT( |
16 | type="text/javascript", |
17 | src="/static/js/anchors.js", |
18 | ), |
19 | # Tracking script |
20 | hg.SCRIPT( |
21 | hg.mark_safe( |
22 | """var _paq = window._paq = window._paq || []; |
23 | _paq.push(["setDocumentTitle", document.domain + "/" + document.title]); |
24 | _paq.push(["setCookieDomain", "*.*.joshstock.in"]); |
25 | _paq.push(["setDomains", ["*.*.joshstock.in"]]); |
26 | _paq.push(['trackPageView']); |
27 | _paq.push(['enableLinkTracking']); |
28 | (function() { |
29 | var u="//analytics.joshstock.in/"; |
30 | _paq.push(['setTrackerUrl', u+'matomo.php']); |
31 | _paq.push(['setSiteId', '1']); |
32 | var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; |
33 | g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s); |
34 | })();""", |
35 | ), |
36 | ), |
37 | hg.NOSCRIPT( |
38 | hg.P( |
39 | hg.IMG( |
40 | src="//analytics.joshstock.in/matomo.php?idsite=1&rec=1", |
41 | border="0", |
42 | alt="", |
43 | ), |
44 | ), |
45 | ), |
46 | ] |
47 |
|
48 | return contents |
49 |
|