Skip to content

Commit

Permalink
change path of service worker
Browse files Browse the repository at this point in the history
  • Loading branch information
SiddharthDhirde committed Mar 30, 2024
1 parent 0f7114f commit e68ece9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ if ("serviceWorker" in navigator) {
window.addEventListener("load", () => {
navigator.serviceWorker
.register(
"https://siddharthdhirde.github.io/NoticeBoard/sw_cached_site.js"
"../sw_cached_site.js"
)
.then((reg) => console.log("ServiceWorker registered successfully"))
.catch((err) => console.log(`ServiceWorker registration failed: ${err}`));
});
}

function fetchNoticeMessages() {
return fetch("https://siddharthdhirde.github.io/NoticeBoard/notices.json")
return fetch("../notices.json")
.then((response) => response.json())
.then((data) => data.map((item) => item.message));
}
Expand Down

0 comments on commit e68ece9

Please sign in to comment.