// When the page loads, check if the user has visited the "Complete Task" page
window.addEventListener('DOMContentLoaded', function() {
if (localStorage.getItem('visitedCompleteTask') === 'true') {
document.getElementById('task-complete').checked = true;
}
});
// If the user visits the "Complete Task" page, set the localStorage flag
if (window.location.pathname === '/complete-task/') {
localStorage.setItem('visitedCompleteTask', 'true');
}