cb0e38cd12
Current system (where the index page is specified in the puppet-ptgbot module) requires that (some) links on the page are updated in puppet-ptgbot at the start of every event. That page should be dynamically generated from JSON data. That way the list of links can be provided in the JSON database and dynamically imported and updated using the ~fetchdb command. Change-Id: I7d82b38cba495e5837ba54fbe7a9b7e9c8e14259
10 lines
340 B
JavaScript
10 lines
340 B
JavaScript
// sets variable source to the animalTemplate id in index.html
|
|
var source = document.getElementById("LinksTemplate").innerHTML;
|
|
|
|
// Handlebars compiles the above source into a template
|
|
var template = Handlebars.compile(source);
|
|
|
|
$.getJSON("ptg.json", function(json) {
|
|
document.getElementById("ExtraLinks").innerHTML = template(json);
|
|
});
|