summaryrefslogtreecommitdiff
path: root/assets/js/data.js
blob: 14f041359ad83f63388b4f21cb957fa4f1f4954f (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
var data_links = "links.json";

document.addEventListener("DOMContentLoaded", function () {
  fetch(data_links)
  .then( response => response.json())
  .then(
    function (data) {
      var mysource = document.getElementById("links-template").innerHTML;
      var mytemplate = Handlebars.compile(mysource);
      var myresult = mytemplate(data)
      document.getElementById("links").innerHTML = myresult;
    });
});

var data_apps = "apps.json";

document.addEventListener("DOMContentLoaded", function () {
  fetch(data_apps)
  .then( response => response.json())
  .then(
    function (data) {
      var mysource = document.getElementById("apps-template").innerHTML;
      var mytemplate = Handlebars.compile(mysource);
      var myresult = mytemplate(data)
      document.getElementById("apps").innerHTML = myresult;
    });
});

var data_providers = "providers.json";

document.addEventListener("DOMContentLoaded", function () {
  fetch(data_providers)
  .then( response => response.json())
  .then(
    function (data) {
      var mysource = document.getElementById("providers-template").innerHTML;
      var mytemplate = Handlebars.compile(mysource);
      var myresult = mytemplate(data)
      document.getElementById("providers").innerHTML = myresult;
    });
});