From 40a0423208c0863fb5be95f4e6bdc48a25482996 Mon Sep 17 00:00:00 2001 From: "jakob.stendahl" Date: Sun, 15 Jan 2023 22:45:19 +0100 Subject: Fix service worker error, update deploy script --- src/js/main.js | 2 +- src/service-worker.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/js/main.js b/src/js/main.js index 801a9eb..3a6f9e9 100644 --- a/src/js/main.js +++ b/src/js/main.js @@ -6,7 +6,7 @@ import { Gamepad } from './gamepad'; let sw = "service-worker.js"; if (navigator.serviceWorker) { navigator.serviceWorker.register( - sw, {scope: '/hoverbit-ble/'} + sw, {scope: '/microbit-gamepad/'} ).then(registration => { registration.onupdatefound = () => { const installingWorker = registration.installing; diff --git a/src/service-worker.js b/src/service-worker.js index 96accb3..112a0e7 100644 --- a/src/service-worker.js +++ b/src/service-worker.js @@ -1,4 +1,4 @@ -var APP_PREFIX = 'hoverbitcontroller' // Identifier for this app (this needs to be consistent across every cache update) +var APP_PREFIX = 'microbitgamepad' // Identifier for this app (this needs to be consistent across every cache update) var VERSION = '{{ VERSION }}' // Version of the off-line cache (change this value everytime you want to update cache) var CACHE_NAME = APP_PREFIX + VERSION var URLS = ["{{ CACHE_FILES }}"] // This will be replaced by the deploy-script -- cgit v1.2.3