Skip to content

Commit

Permalink
Adjust paths for service worker
Browse files Browse the repository at this point in the history
When running via GitHub pages, the files are not in root directory.

Part of #47.
  • Loading branch information
krzema12 committed Aug 29, 2020
1 parent b7168c5 commit def4179
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion web/src/main/kotlin/it/krzeminski/fsynth/main.kt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ fun main() {
// Install Progressive Web App worker
window.addEventListener("load", {
window.navigator.serviceWorker
.register("/serviceworker.js")
.register("serviceworker.js")
.then { console.log("Service worker registered!") }
.catch { console.error("Service worker registration failed: $it") }
})
Expand Down
2 changes: 1 addition & 1 deletion web/src/main/resources/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8">
<title>fsynth Web demo</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<link rel="manifest" href="/manifest.webmanifest">
<link rel="manifest" href="manifest.webmanifest">
</head>
<body>
<div id="root"></div>
Expand Down
2 changes: 1 addition & 1 deletion web/src/main/resources/manifest.webmanifest
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "fsynth",
"short_name": "fsynth",
"start_url": "/",
"start_url": ".",
"display": "standalone",
"background_color": "#fff",
"description": "Music synthesizer, written for fun and to learn stuff.",
Expand Down

0 comments on commit def4179

Please sign in to comment.