(function () { var nodes = document.querySelectorAll(".cascade-bar [data-tip]"); if (!nodes.length) return; fetch("/branch-status.json", { cache: "no-store" }) .then(function (res) { if (!res.ok) throw new Error("status"); return res.json(); }) .then(function (data) { var tips = {}; var list = (data && data.branches) || []; for (var i = 0; i < list.length; i++) { var row = list[i]; if (row && row.branch && row.tip) tips[row.branch] = row.tip; } for (var j = 0; j < nodes.length; j++) { var el = nodes[j]; var name = el.getAttribute("data-tip"); var tip = tips[name]; if (tip) el.textContent = name + " @ " + tip; } }) .catch(function () {}); })();