Update 1.js
This commit is contained in:
+5
-2
@@ -219,15 +219,18 @@ if ('serviceWorker' in navigator) {
|
|||||||
window.addEventListener('load', () => {
|
window.addEventListener('load', () => {
|
||||||
navigator.serviceWorker.register('/service-worker.js')
|
navigator.serviceWorker.register('/service-worker.js')
|
||||||
.then(registration => {
|
.then(registration => {
|
||||||
//console.log('Service Worker registered with scope:', registration.scope);
|
console.log('Service Worker registered with scope:', registration.scope);
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
//console.log('Service Worker registration failed:', error);
|
console.log('Service Worker registration failed:', error);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
console.log('Service Worker is not supported in this browser.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*TO-TOP BUTTON REVEALING*/
|
/*TO-TOP BUTTON REVEALING*/
|
||||||
const toTop = document.querySelector(".to-top");
|
const toTop = document.querySelector(".to-top");
|
||||||
const trandingSlideContent = document.querySelector(".tranding-slide-content");
|
const trandingSlideContent = document.querySelector(".tranding-slide-content");
|
||||||
|
|||||||
Reference in New Issue
Block a user