Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix persistent homepage form #89

Merged
merged 2 commits into from
Apr 22, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,13 +227,13 @@ addWhatappEventHandler();

// service worker

if('serviceWorker' in navigator){
window.addEventListener('load', () => {
navigator.serviceWorker.register('/sw.js')
.then( (reg)=>{
console.log('service worker registered', reg)
})
.catch((err)=> console.log('Service worker not registered', err));
});
// if('serviceWorker' in navigator){
// window.addEventListener('load', () => {
// navigator.serviceWorker.register('/sw.js')
// .then( (reg)=>{
// console.log('service worker registered', reg)
// })
// .catch((err)=> console.log('Service worker not registered', err));
// });

}
// }
5 changes: 3 additions & 2 deletions js/form.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ function popForm() {
if (!countNumber)
countNumber = 1;
const popFormHtml = `<section class="pop-up-container">
<form action="/html/countdown-list.html" method="get" id='customDateForm' class="pop-up-form">
<form id='customDateForm' class="pop-up-form">
<div class="form-header">Set Countdown</div>
<div class="form-sections">
<label for="">Note &nbsp;</label>
Expand Down Expand Up @@ -106,7 +106,8 @@ function handleFormSubmission() {
}

// testing
// closeFormPopUp();
window.location.href = "/html/countdown-list.html";
closeFormPopUp();
})
}

Expand Down