Skip to content

Commit

Permalink
Converted to PWA
Browse files Browse the repository at this point in the history
  • Loading branch information
ieb committed May 24, 2024
1 parent 32d1380 commit 813acc9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
<script src="d3.v7.min.js"></script>
<script src="index.js" ></script>
<link rel="stylesheet" type="text/css" href="main.css">
<link rel="icon" type="image/png" href="/icon144.png">
<link rel="manifest" href="manifest.json" crossorigin="use-credentials" />
</head>
<body>

Expand Down
4 changes: 4 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
/*jshint node:false */
"use strict";

if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('/lifepo4/worker.js', { scope: './', type: 'module' });
}


window.addEventListener("load", () => {
const bleReader = new JDBBMSReader();
Expand Down

0 comments on commit 813acc9

Please sign in to comment.