Files
bqkc/.github/_includes/js/timeline-js.html
Nasir Anthony Montalvo 0a854da998 reconnect
2026-01-26 02:25:43 -06:00

21 lines
842 B
HTML

<script>
(function(){
// init bootstrap tooltips
var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'));
var tooltipList = tooltipTriggerList.map(function (tooltipTriggerEl) {
return new bootstrap.Tooltip(tooltipTriggerEl)
});
// highlight active year row
function highlightYear() {
var hashfilter = "tr#" + decodeURIComponent(location.hash.substr(1));
document.querySelectorAll("table#timeline tr").forEach(row => { row.classList.remove('table-info'); });
if (document.querySelector(hashfilter)) { document.querySelector(hashfilter).classList.add("table-info"); }
}
// if in initial hash
if (window.location.hash) { highlightYear(); }
// on hash change
window.addEventListener("hashchange", highlightYear);
})();
</script>