aboutsummaryrefslogtreecommitdiff
path: root/_includes/footer.html
blob: 9d95bacfd83afe6a83d883299392ec0cd7800c0c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-12769079-10"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag() {
    dataLayer.push(arguments);
  }
  gtag('js', new Date());
  gtag('config', 'UA-12769079-10');
</script>

<!-- Responsive tables -->
<script>
  document.querySelectorAll('table').forEach(function(element) {
    if (!element.classList.contains('rouge-table')) {
      let parent = element.parentNode;
      let wrapper = document.createElement('div');
      wrapper.classList.add('responsive-table');
      parent.replaceChild(wrapper, element);
      wrapper.appendChild(element);
    }
  });
</script>

<!-- Open external links in new tab -->
<script>
  let links = document.links;
  for (let i = 0, linksLength = links.length; i < linksLength; i++) {
    if (links[i].hostname != window.location.hostname) {
      links[i].target = '_blank';
      links[i].setAttribute('rel', 'noopener');
    }
  }
</script>

<!-- Linked data - Social profile -->
<script type="application/ld+json">
  {
  	"@context": "http://schema.org",
  	"@type": "Person",
  	"name": "Mitja Felicijan",
  	"jobTitle": "Embedded systems developer",
  	"url": "https://mitjafelicijan.com",
  	"sameAs": [
  		"https://github.com/mitjafelicijan",
  		"https://twitter.com/mitjafelicijan",
  		"https://plus.google.com/+MitjaFelicijan"
  	]
  }
</script>

<!-- Service worker -->
<script>
  if ('serviceWorker' in navigator) {
    navigator.serviceWorker.register('/sw.js').then(function() {
      console.log('Service Worker Registered');
    });
  }
</script>