|
|
@@ -1489,6 +1489,24 @@
|
|
|
});
|
|
|
});
|
|
|
if (el('l2-history-count')) el('l2-history-count').textContent = list.length;
|
|
|
+ // Keep the toolbar selector in sync with the same history list. The
|
|
|
+ // side panel is the primary entry point; the selector is a shortcut.
|
|
|
+ var sel = el('l2-ts');
|
|
|
+ if (sel) {
|
|
|
+ var old = sel.value;
|
|
|
+ sel.innerHTML = '';
|
|
|
+ var live = document.createElement('option');
|
|
|
+ live.value = '';
|
|
|
+ live.textContent = t('l2.time_live', 'Live');
|
|
|
+ sel.appendChild(live);
|
|
|
+ list.forEach(function (it) {
|
|
|
+ var opt = document.createElement('option');
|
|
|
+ opt.value = String(it.ts || '');
|
|
|
+ opt.textContent = it.captured_at || fmtTs(it.ts);
|
|
|
+ sel.appendChild(opt);
|
|
|
+ });
|
|
|
+ sel.value = used || old || '';
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
function esc(s) { return String(s == null ? '' : s).replace(/[&<>"']/g, function (c) { return ({'&':'&','<':'<','>':'>','"':'"',"'":'''})[c]; }); }
|