(function () { var config = window.APP_SITE_CONFIG || {}; document.querySelectorAll("[data-config]").forEach(function (node) { var key = node.getAttribute("data-config"); if (config[key]) { node.textContent = config[key]; } }); document.querySelectorAll("[data-mailto]").forEach(function (node) { var key = node.getAttribute("data-mailto"); var value = config[key]; if (!value) { return; } node.textContent = value; if (node.tagName === "A") { node.href = "mailto:" + value; } }); document.querySelectorAll("[data-store-link]").forEach(function (node) { if (config.storeUrl) { node.href = config.storeUrl; } if (config.storeLabel && node.hasAttribute("data-store-label")) { node.textContent = config.storeLabel; } }); document.querySelectorAll("[data-year]").forEach(function (node) { node.textContent = new Date().getFullYear(); }); })();