Update 1.js
This commit is contained in:
+6
-14
@@ -215,20 +215,12 @@ document.addEventListener("DOMContentLoaded", function() {
|
|||||||
|
|
||||||
|
|
||||||
/*SAVE DATA AND RUN OFFLINE*/
|
/*SAVE DATA AND RUN OFFLINE*/
|
||||||
if ('serviceWorker' in navigator) {
|
if ("serviceWorker" in navigator) {
|
||||||
window.addEventListener('load', () => {
|
navigator.serviceWorker
|
||||||
navigator.serviceWorker.register('/service-worker.js')
|
.register("/service-worker.js")
|
||||||
.then(registration => {
|
.then(() => console.log("Service Worker başarıyla yüklendi."))
|
||||||
console.log('Service Worker registered with scope:', registration.scope);
|
.catch((err) => console.log("Service Worker yüklenemedi:", err));
|
||||||
})
|
}
|
||||||
.catch(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*/
|
||||||
|
|||||||
Reference in New Issue
Block a user