14 lines
430 B
JavaScript
14 lines
430 B
JavaScript
// Back-to-hub button with active-task confirmation
|
|
(function () {
|
|
document.addEventListener('DOMContentLoaded', () => {
|
|
const backBtn = document.getElementById('back-to-hub')
|
|
if (!backBtn) return
|
|
|
|
// Immediately navigate back to hub/menu without confirmation
|
|
backBtn.addEventListener('click', (e) => {
|
|
const href = backBtn.getAttribute('href')
|
|
if (href) window.location.href = href
|
|
})
|
|
})
|
|
})()
|