diff --git a/js/sudoku.js b/js/sudoku.js index 809ba1d..0f58aec 100755 --- a/js/sudoku.js +++ b/js/sudoku.js @@ -70,8 +70,8 @@ window.onload = function() { label.control.label = label } - if (/Win/.test(navigator.platform) || /Linux/.test(navigator.platform)) accessKeyModifiers = "Alt+Maj+" - else if (/Mac/.test(navigator.platform)) accessKeyModifiers = "⌃⌥" + if (/Win/.test(navigator.userAgent) || /Linux/.test(navigator.userAgent)) accessKeyModifiers = "Alt+Maj+" + else if (/Mac/.test(navigator.userAgent)) accessKeyModifiers = "⌃⌥" for (node of document.querySelectorAll("*[accesskey]")) { shortcut = ` [${node.accessKeyLabel||(accessKeyModifiers+node.accessKey)}]` if (node.title) node.title += shortcut @@ -83,7 +83,7 @@ window.onload = function() { colorPickerInput.value = window.getComputedStyle(grid).getPropertyValue("--bs-body-color") if ("serviceWorker" in navigator) { - navigator.serviceWorker.register(`service-worker.php?location=${location.pathname}`) + navigator.serviceWorker.register(`service-worker.js`) } } diff --git a/service-worker.php b/service-worker.js similarity index 92% rename from service-worker.php rename to service-worker.js index 779d131..5b1e5ce 100644 --- a/service-worker.php +++ b/service-worker.js @@ -1,11 +1,3 @@ - /* Copyright 2015, 2019, 2020 Google LLC. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); @@ -24,7 +16,7 @@ Copyright 2015, 2019, 2020 Google LLC. All Rights Reserved. const OFFLINE_VERSION = 1; const CACHE_NAME = "offline"; // Customize this with a different URL if needed. -const OFFLINE_URL = ""; +const OFFLINE_URL = "."; self.addEventListener("install", (event) => { event.waitUntil(